Language: C

#include <stdio.h>
#include <string.h>
void swap(char *,char *);
int main()
{
  int i,j,k,l,N,count=0;
  char a[100][100],b[100][100];

  scanf("%d",&N);
  for(i=0;i<N;i++)
    {
      for(j=0;j<2;j++)
        {
          scanf("%c",&a[i][j]);
        }
    }
  for(i=0;i<N-1;i++)
    {
      for(j=1;j>0;j--)
        {
          if(a[i][j]<a[i+1][j])
            {
              swap(&a[i][j],&a[i+1][j]);
              swap(&a[i][0],&a[i+1][0]);
              count++;
            }
        }
    }
  for(i=0;i<N;i++)
    {
      for(j=0;j<2;j++)
        {
          printf("%c",a[i][j]);
        }
      if(i!=N-1) printf(" ");
    }
  printf("\n");
  printf("Stable\n");

strcpy(a,b);
  for(i=0;i<N-1;i++)
    {
      min=i;
      for(j=1;j<0;j--)
        {
          if(b[i][j]<b[i][min]) min=j;
        }
      swap(&b[i][j],&b[i][min]);
      swap(&b[i][j],&b[i][min]);
      if(i!=min) count++;
    }
   for(i=0;i<N;i++)
    {
      for(j=0;j<2;j++)
        {
          printf("%c",b[i][j]);
        }
      if(i!=N-1) printf(" ");
    }
  printf("\n");
  if(strcmp(a,b)==0)     printf("Stable\n");
  else    printf("Not stable\n");

  return 0;
}

void swap(char *x,char *y)
{
  char z;

  z=*x;
  *x=*y;
  *y=z;
}

Compiler output:
main.c: In function 'main':
main.c:40:8: error: passing argument 1 of 'strcpy' from incompatible pointer type [-Wincompatible-pointer-types]
   40 | strcpy(a,b);
      |        ^
      |        |
      |        char (*)[100]
In file included from main.c:2:
/usr/include/string.h:141:39: note: expected 'char * restrict' but argument is of type 'char (*)[100]'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
main.c:40:10: error: passing argument 2 of 'strcpy' from incompatible pointer type [-Wincompatible-pointer-types]
   40 | strcpy(a,b);
      |          ^
      |          |
      |          char (*)[100]
/usr/include/string.h:141:70: note: expected 'const char * restrict' but argument is of type 'char (*)[100]'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:43:7: error: 'min' undeclared (first use in this function); did you mean 'main'?
   43 |       min=i;
      |       ^~~
      |       main
main.c:43:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:61:13: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   61 |   if(strcmp(a,b)==0)     printf("Stable\n");
      |             ^
      |             |
      |             char (*)[100]
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char (*)[100]'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:61:15: error: passing argument 2 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   61 |   if(strcmp(a,b)==0)     printf("Stable\n");
      |               ^
      |               |
      |               char (*)[100]
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char (*)[100]'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~