Language: C

#include<stdio.h>
 
 struct card{
           char gara;
           int kazu;
           };

 card card1[37];
 card card2[37];

 void bublle(struct card card1[],int n){
               int i,j;
               card t;
               for(i=0;i<n;i++){
                          for(j=n;j>i;j--){
                                   if(card1[j-1].kazu>card1[j].kazu){
                                                   t=card1[j-1].kazu;
                                                   card1[j-1].kazu=card1[j].kazu;
                                                   card1[j].kazu=t;
                                                   }
                                   }
                          }
               return 0;
               }

 void select(struct card card2[],int n){
           int i,j,min;
           card t;
           for(i=0;i<n;i++){
                     min=i;
                     for(j=i;j<n;j++){
                              if(card2[j].kazu<card2[min].kazu){
                                                        min=j;
                                                        }
                              }
                     if(min!=i){
                              t=card2[j-1].kazu;
                              card2[j-1].kazu=card2[j].kazu;
                              card2[j].kazu=t;
                                 }
            return 0;
            }
 
 int main(){
         int i,j,n,x,flag;
         char c;
         scanf("%d",&n);
         for(i=0;i<n;i++){
                    scanf("%c%d",&c,&x);
                    card1[i].gara=c;
                    card2[i].gara=card1[i].gara;
                    card1[i].kazu=x;
                    card2[i].kazu=card1[i].kazu;
                    }

         bublle(card1,n);
         for(i=0;i<n;i++){
                   printf("%c%d%c",card1[i].gara,card1[i].kazu,(i==n-1)?'\n':' ');
                   }
         printf("Stable\n");
         select(card2,n);
         for(i=0;i<n;i++){
                   printf("%c%d%c",card2[i].gara,card2[i].kazu,(i==n-1)?'\n':' ');
                   }
         flag=1;
         for(i=0;i<n;i++){
                  if(card2[i].gara!=card1[i].gara){flag=0;break;}
                  }
         if(flag==1)printf("Stable\n");
         else printf("Not stable\n");

         return 0;
         }








Compiler output:
main.c:8:2: error: unknown type name 'card'; use 'struct' keyword to refer to the type
    8 |  card card1[37];
      |  ^~~~
      |  struct 
main.c:9:2: error: unknown type name 'card'; use 'struct' keyword to refer to the type
    9 |  card card2[37];
      |  ^~~~
      |  struct 
main.c: In function 'bublle':
main.c:13:16: error: unknown type name 'card'; use 'struct' keyword to refer to the type
   13 |                card t;
      |                ^~~~
      |                struct 
main.c:23:23: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   23 |                return 0;
      |                       ^
main.c:11:7: note: declared here
   11 |  void bublle(struct card card1[],int n){
      |       ^~~~~~
main.c: In function 'select':
main.c:28:12: error: unknown type name 'card'; use 'struct' keyword to refer to the type
   28 |            card t;
      |            ^~~~
      |            struct 
main.c:41:20: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   41 |             return 0;
      |                    ^
main.c:26:7: note: declared here
   26 |  void select(struct card card2[],int n){
      |       ^~~~~~
main.c: In function 'main':
main.c:50:29: error: request for member 'gara' in something not a structure or union
   50 |                     card1[i].gara=c;
      |                             ^
main.c:51:43: error: request for member 'gara' in something not a structure or union
   51 |                     card2[i].gara=card1[i].gara;
      |                                           ^
main.c:52:29: error: request for member 'kazu' in something not a structure or union
   52 |                     card1[i].kazu=x;
      |                             ^
main.c:53:43: error: request for member 'kazu' in something not a structure or union
   53 |                     card2[i].kazu=card1[i].kazu;
      |                                           ^
main.c:56:17: error: passing argument 1 of 'bublle' from incompatible pointer type [-Wincompatible-pointer-types]
   56 |          bublle(card1,n);
      |                 ^~~~~
      |                 |
      |                 int *
main.c:11:26: note: expected 'struct card *' but argument is of type 'int *'
   11 |  void bublle(struct card card1[],int n){
      |              ~~~~~~~~~~~~^~~~~~~
main.c:58:44: error: request for member 'gara' in something not a structure or union
   58 |                    printf("%c%d%c",card1[i].gara,card1[i].kazu,(i==n-1)?'\n':' ');
      |                                            ^
main.c:58:58: error: request for member 'kazu' in something not a structure or union
   58 |                    printf("%c%d%c",card1[i].gara,card1[i].kazu,(i==n-1)?'\n':' ');
      |                                                          ^
main.c:67:45: error: request for member 'gara' in something not a structure or union
   67 |                   if(card2[i].gara!=card1[i].gara){flag=0;break;}
      |                                             ^
main.c: In function 'select':
main.c:73:10: error: expected declaration or statement at end of input
   73 |          }
      |          ^