Language: C

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

 struct card card1;
 struct card card2;

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

 void select(struct card2,int n){
           int i,j,min,tmp,tmp2;
           for(i=0;i<n;i++){
                     min=i;
                     for(j=i;j<n;j++){
                              if(card2.kazu[j]<card2.kazu[min]){
                                                        min=j;
                                                        }
                              }
                     if(min!=i){
                                 tmp=card1.kazu[min];
                                 tmp2=card1.gara[min];
                                 card1.kazu[min]=card1.kazu[i];
                                 card1.gara[min]=card1.gara[i];
                                 card1.kazu[i]=tmp;
                                 card1.gara[i]=tmp2;
                                 }
            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.gara[i]=c;
                    card2.gara[i]=card1.gara[i];
                    card1.kazu[i]=x;
                    card2.kazu[i]=card1.kazu[i];
                    }

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

         return 0;
         }








Compiler output:
main.c:11:21: warning: 'struct card1' declared inside parameter list will not be visible outside of this definition or declaration
   11 |  void bublle(struct card1,int n){
      |                     ^~~~~
main.c:11:14: error: parameter 1 has incomplete type
   11 |  void bublle(struct card1,int n){
      |              ^~~~~~~~~~~~
main.c: In function 'bublle':
main.c:25:23: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   25 |                return 0;
      |                       ^
main.c:11:7: note: declared here
   11 |  void bublle(struct card1,int n){
      |       ^~~~~~
main.c: At top level:
main.c:28:21: warning: 'struct card2' declared inside parameter list will not be visible outside of this definition or declaration
   28 |  void select(struct card2,int n){
      |                     ^~~~~
main.c:28:14: error: parameter 1 has incomplete type
   28 |  void select(struct card2,int n){
      |              ^~~~~~~~~~~~
main.c: In function 'select':
main.c:45:20: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   45 |             return 0;
      |                    ^
main.c:28:7: note: declared here
   28 |  void select(struct card2,int n){
      |       ^~~~~~
main.c:77:10: error: expected declaration or statement at end of input
   77 |          }
      |          ^