Language: C

#include<stdio.h>
typedef struct{
  int n;
  char m;
}Card;
void qsort(Card*,int,int);
int  part(Card*,int,int);

main(){
  int i,j,g,p,r,x,count=0,C[10000];
  char y,B[100000];
  Card A[100000];
  scanf("%d",&g);
  for(i=0;i<g;i++){
    scanf(" %c%d",&A[i].m,&A[i].n);
    C[i] = A[i].n;
    B[i] = A[i].m;
  }
  j=0;
  for(i=g-1;i>j;i--){
    if(n[i]<n[i-1]){
      x = C[i-1];
      C[i-1] = C[i];
      B[i] = x;
      y = C[i-1];
      C[i-1] = C[i];
      C[i] = y;
    }}
  j++;
  if(j==g-1)break;
}

  p=0;
  r=g-1;
  qsort(&A[0],p,r);
  for(i=0;i<g;i++){
    if(B[i] != A[i].m)count++;
  }
  if(count>0)printf("Not stable\n");
  else if(count == 0)printf("Stable\n");
  for(i=0;i<g;i++)printf("%c %d\n",A[i].m,A[i].n);
  return 0;
}
void qsort(Card *A ,int p,int r){
  int q;
  if(p<r){
    q = part(A,p,r);
    qsort(A,p,q-1);
    qsort(A,q+1,r);
  }
}

int part(Card *A,int p,int r){
  int i,j,x,taihi;
  char taihi2;
  x = A[r].n;
  i = p-1;
  for(j=p;j<r;j++){
    if(A[j].n<=x){
      i++;
      taihi = A[i].n;
      A[i].n = A[j].n;
      A[j].n = taihi;
      taihi2 = A[i].m;
      A[i].m = A[j].m;
      A[j].m = taihi2;

   }
}
taihi = A[i+1].n;
  A[i+1].n = A[r].n;
  A[r].n = taihi;
  taihi2 = A[i+1].m;
  A[i+1].m = A[r].m;
  A[r].m = taihi2;

  return i+1;
}

Compiler output:
main.c:9:1: error: return type defaults to 'int' [-Wimplicit-int]
    9 | main(){
      | ^~~~
main.c: In function 'main':
main.c:21:8: error: 'n' undeclared (first use in this function)
   21 |     if(n[i]<n[i-1]){
      |        ^
main.c:21:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:13: error: break statement not within loop or switch
   30 |   if(j==g-1)break;
      |             ^~~~~
main.c: At top level:
main.c:33:3: warning: data definition has no type or storage class
   33 |   p=0;
      |   ^
main.c:33:3: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
main.c:34:3: warning: data definition has no type or storage class
   34 |   r=g-1;
      |   ^
main.c:34:3: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
main.c:34:5: error: 'g' undeclared here (not in a function)
   34 |   r=g-1;
      |     ^
main.c:35:9: error: expected declaration specifiers or '...' before '&' token
   35 |   qsort(&A[0],p,r);
      |         ^
main.c:35:15: error: expected declaration specifiers or '...' before 'p'
   35 |   qsort(&A[0],p,r);
      |               ^
main.c:35:17: error: expected declaration specifiers or '...' before 'r'
   35 |   qsort(&A[0],p,r);
      |                 ^
main.c:36:3: error: expected identifier or '(' before 'for'
   36 |   for(i=0;i<g;i++){
      |   ^~~
main.c:36:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   36 |   for(i=0;i<g;i++){
      |            ^
main.c:36:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   36 |   for(i=0;i<g;i++){
      |                ^~
main.c:39:3: error: expected identifier or '(' before 'if'
   39 |   if(count>0)printf("Not stable\n");
      |   ^~
main.c:40:3: error: expected identifier or '(' before 'else'
   40 |   else if(count == 0)printf("Stable\n");
      |   ^~~~
main.c:41:3: error: expected identifier or '(' before 'for'
   41 |   for(i=0;i<g;i++)printf("%c %d\n",A[i].m,A[i].n);
      |   ^~~
main.c:41:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   41 |   for(i=0;i<g;i++)printf("%c %d\n",A[i].m,A[i].n);
      |            ^
main.c:41:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   41 |   for(i=0;i<g;i++)printf("%c %d\n",A[i].m,A[i].n);
      |                ^~
main.c:42:3: error: expected identifier or '(' before 'return'
   42 |   return 0;
      |   ^~~~~~
main.c:43:1: error: expected identifier or '(' before '}' token
   43 | }
      | ^