Language: C

#include <stdio.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);

}

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

 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:23:22: error: request for member 'mark' in something not a structure or union
   23 |   printf("%c%d ",a[i].mark,a[i].num);
      |                      ^
main.c:23:32: error: request for member 'num' in something not a structure or union
   23 |   printf("%c%d ",a[i].mark,a[i].num);
      |                                ^
main.c:25:24: error: request for member 'mark' in something not a structure or union
   25 |  printf("%c%d\n",a[N-1].mark,a[N-1].num);
      |                        ^
main.c:25:36: error: request for member 'num' in something not a structure or union
   25 |  printf("%c%d\n",a[N-1].mark,a[N-1].num);
      |                                    ^
main.c: In function 'main':
main.c:36:21: error: request for member 'mark' in something not a structure or union
   36 |   scanf("%c%d",&a[i].mark,a[i].num);
      |                     ^
main.c:36:31: error: request for member 'num' in something not a structure or union
   36 |   scanf("%c%d",&a[i].mark,a[i].num);
      |                               ^
main.c:41:11: error: request for member 'num' in something not a structure or union
   41 |    if(a[j].num<a[j-1].num){
      |           ^
main.c:41:22: error: request for member 'num' in something not a structure or union
   41 |    if(a[j].num<a[j-1].num){
      |                      ^
main.c:42:17: error: request for member 'num' in something not a structure or union
   42 |      change(a[j].num,a[j-1].num,a[j].mark,a[j-1].mark);
      |                 ^
main.c:42:28: error: request for member 'num' in something not a structure or union
   42 |      change(a[j].num,a[j-1].num,a[j].mark,a[j-1].mark);
      |                            ^
main.c:42:37: error: request for member 'mark' in something not a structure or union
   42 |      change(a[j].num,a[j-1].num,a[j].mark,a[j-1].mark);
      |                                     ^
main.c:42:49: error: request for member 'mark' in something not a structure or union
   42 |      change(a[j].num,a[j-1].num,a[j].mark,a[j-1].mark);
      |                                                 ^
main.c:62:15: error: request for member 'num' in something not a structure or union
   62 |    change(a[i].num,a[min].num,a[i].mark,a[min].mark);
      |               ^
main.c:62:26: error: request for member 'num' in something not a structure or union
   62 |    change(a[i].num,a[min].num,a[i].mark,a[min].mark);
      |                          ^
main.c:62:35: error: request for member 'mark' in something not a structure or union
   62 |    change(a[i].num,a[min].num,a[i].mark,a[min].mark);
      |                                   ^
main.c:62:47: error: request for member 'mark' in something not a structure or union
   62 |    change(a[i].num,a[min].num,a[i].mark,a[min].mark);
      |                                               ^
main.c:69:10: error: request for member 'num' in something not a structure or union
   69 |   if(a[i].num==b[i].num&&a[i].mark!=b[i]){
      |          ^
main.c:69:20: error: request for member 'num' in something not a structure or union
   69 |   if(a[i].num==b[i].num&&a[i].mark!=b[i]){
      |                    ^
main.c:69:30: error: request for member 'mark' in something not a structure or union
   69 |   if(a[i].num==b[i].num&&a[i].mark!=b[i]){
      |                              ^