Language: C

#include <stdio.h>
#include <string.h>

void change(int n,int m,char s,char t)
{
 int l;
 char r;

 l=n;
 n=m;
 m=l;

 r=s;
 s=t;
 t=r;

}

void print(int a[],int N)
{
 int i;

 for(i=0;i<N-1;i++){
  printf("%c%d ",a[i].mark,a[i].num);
 }
 printf("%c%d\n",a[N-1].mark,a[N-1].num);

}

struct card {
    char mark[1];
    int  num;
};

int main(void)
{
 int N,i,j,k,l,min;
 struct card a[36],b[36];

 scanf("%d",&N);

 for(i=0;i<N;i++){
  scanf("%c%d",&a[i].mark,a[i].num);
 }

 for(i=0;i<N-1;i++){
  for(j=N-1;j<i+1;j--){
   if(a[j].num<a[j-1].num){
     change(a[j].num,a[j-1].num,a[j].mark,a[j-1].mark);
   }
  }
 }

 for(i=0;i<N;i++){
  b[i]=a[i];
 }

 print(a,N);
 printf("Stable\n");

 for(i=0;i<N-1;i++){

  min=i;
  for(j=i;j<N;j++){

   if(a[j]<a[min]){
    min=j;
   }
   change(a[i].num,a[min].num,a[i].mark,a[min].mark);

  }
 }

 print(a,N);
 for(i=0;i<N;i++){
  if(a[i].num==b[i].num&&a[i].mark!=b[i]){
   printf("Not stable\n");
  }else{
   printf("Stable\n");
  }
 }

 return 0;

}

Compiler output:
main.c: In function 'print':
main.c:24:22: error: request for member 'mark' in something not a structure or union
   24 |   printf("%c%d ",a[i].mark,a[i].num);
      |                      ^
main.c:24:32: error: request for member 'num' in something not a structure or union
   24 |   printf("%c%d ",a[i].mark,a[i].num);
      |                                ^
main.c:26:24: error: request for member 'mark' in something not a structure or union
   26 |  printf("%c%d\n",a[N-1].mark,a[N-1].num);
      |                        ^
main.c:26:36: error: request for member 'num' in something not a structure or union
   26 |  printf("%c%d\n",a[N-1].mark,a[N-1].num);
      |                                    ^
main.c: In function 'main':
main.c:49:37: error: passing argument 3 of 'change' makes integer from pointer without a cast [-Wint-conversion]
   49 |      change(a[j].num,a[j-1].num,a[j].mark,a[j-1].mark);
      |                                 ~~~~^~~~~
      |                                     |
      |                                     char *
main.c:4:30: note: expected 'char' but argument is of type 'char *'
    4 | void change(int n,int m,char s,char t)
      |                         ~~~~~^
main.c:49:49: error: passing argument 4 of 'change' makes integer from pointer without a cast [-Wint-conversion]
   49 |      change(a[j].num,a[j-1].num,a[j].mark,a[j-1].mark);
      |                                           ~~~~~~^~~~~
      |                                                 |
      |                                                 char *
main.c:4:37: note: expected 'char' but argument is of type 'char *'
    4 | void change(int n,int m,char s,char t)
      |                                ~~~~~^
main.c:58:8: error: passing argument 1 of 'print' from incompatible pointer type [-Wincompatible-pointer-types]
   58 |  print(a,N);
      |        ^
      |        |
      |        struct card *
main.c:19:16: note: expected 'int *' but argument is of type 'struct card *'
   19 | void print(int a[],int N)
      |            ~~~~^~~
main.c:66:11: error: invalid operands to binary < (have 'struct card' and 'struct card')
   66 |    if(a[j]<a[min]){
      |       ~~~~^~~~~~~
      |        |    |
      |        |    struct card
      |        struct card
main.c:69:35: error: passing argument 3 of 'change' makes integer from pointer without a cast [-Wint-conversion]
   69 |    change(a[i].num,a[min].num,a[i].mark,a[min].mark);
      |                               ~~~~^~~~~
      |                                   |
      |                                   char *
main.c:4:30: note: expected 'char' but argument is of type 'char *'
    4 | void change(int n,int m,char s,char t)
      |                         ~~~~~^
main.c:69:47: error: passing argument 4 of 'change' makes integer from pointer without a cast [-Wint-conversion]
   69 |    change(a[i].num,a[min].num,a[i].mark,a[min].mark);
      |                                         ~~~~~~^~~~~
      |                                               |
      |                                               char *
main.c:4:37: note: expected 'char' but argument is of type 'char *'
    4 | void change(int n,int m,char s,char t)
      |                                ~~~~~^
main.c:74:8: error: passing argument 1 of 'print' from incompatible pointer type [-Wincompatible-pointer-types]
   74 |  print(a,N);
      |        ^
      |        |
      |        struct card *
main.c:19:16: note: expected 'int *' but argument is of type 'struct card *'
   19 | void print(int a[],int N)
      |            ~~~~^~~
main.c:76:35: error: invalid operands to binary != (have 'char *' and 'struct card')
   76 |   if(a[i].num==b[i].num&&a[i].mark!=b[i]){
      |                        ~~         ^~~~~~
      |                        |             |
      |                        char *        struct card