Language: C

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

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

 void bublle(struct card card1[],int n){
               int i,j;
               struct 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;
           struct 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: In function 'bublle':
main.c:17:54: error: incompatible types when assigning to type 'struct card' from type 'int'
   17 |                                                    t=card1[j-1].kazu;
      |                                                      ^~~~~
main.c:19:66: error: incompatible types when assigning to type 'int' from type 'struct card'
   19 |                                                    card1[j].kazu=t;
      |                                                                  ^
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:37:33: error: incompatible types when assigning to type 'struct card' from type 'int'
   37 |                               t=card2[j-1].kazu;
      |                                 ^~~~~
main.c:39:45: error: incompatible types when assigning to type 'int' from type 'struct card'
   39 |                               card2[j].kazu=t;
      |                                             ^
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:73:10: error: expected declaration or statement at end of input
   73 |          }
      |          ^