Language: C

  free(A);
  return 0;
}

void BubbleSort(char **A,int N){
  int i,j,*B,n;
  char keep[2];
  B=(int*)malloc(sizeof(int)*N);
  for(i=0;i<N;i++)
    B[i]=A[i][1]-48;
  for(j=0;j<N;j++){
    for(i=N-1;i>0;i--){
      if(B[i]<B[i-1]){
	n=B[i];
	B[i]=B[i-1];
	B[i-1]=n;
	keep[0]=A[i][0];
	A[i][0]=A[i-1][0];
	A[i-1][0]=keep[0];
	keep[1]=A[i][1];
	A[i][1]=A[i-1][1];
	A[i-1][1]=keep[1];
      }
    }
  }
  for(i=0;i<N;i++){
    printf("%c%c",A[i][0],A[i][1]);
    if(i<N-1)
      printf(" ");
  }
  free(B);
  printf("\n");
  printf("Stable\n");
    }

void SelectionSort(char **A,int N){
  int i,j,*B,n,minj;
  char keep[2];
  B=(int*)malloc(sizeof(int)*N);
  for(i=0;i<N;i++)
    B[i]=A[i][1]-48;
  for(i=0;i<N;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(B[j]<B[minj]){
	minj=j;
      }
    }
    if(i!=minj){
      n=B[i];
      B[i]=B[minj];
      B[minj]=n;
      keep[0]=A[i][0];
      A[i][0]=A[minj][0];
      A[minj][0]=keep[0];
      keep[1]=A[i][1];
      A[i][1]=A[minj][1];
      A[minj][1]=keep[1];
    }
  }
    free(B);
}

Compiler output:
main.c:1:3: warning: data definition has no type or storage class
    1 |   free(A);
      |   ^~~~
main.c:1:3: error: type defaults to 'int' in declaration of 'free' [-Wimplicit-int]
main.c:1:3: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
main.c:1:3: warning: conflicting types for built-in function 'free'; expected 'void(void *)' [-Wbuiltin-declaration-mismatch]
main.c:1:1: note: 'free' is declared in header '<stdlib.h>'
  +++ |+#include <stdlib.h>
    1 |   free(A);
main.c:2:3: error: expected identifier or '(' before 'return'
    2 |   return 0;
      |   ^~~~~~
main.c:3:1: error: expected identifier or '(' before '}' token
    3 | }
      | ^
main.c: In function 'BubbleSort':
main.c:8:11: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    8 |   B=(int*)malloc(sizeof(int)*N);
      |           ^~~~~~
main.c:8:11: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:8:11: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
main.c:8:11: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:27:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   27 |     printf("%c%c",A[i][0],A[i][1]);
      |     ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 |   free(A);
main.c:27:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   27 |     printf("%c%c",A[i][0],A[i][1]);
      |     ^~~~~~
main.c:27:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:32:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   32 |   printf("\n");
      |   ^~~~~~
main.c:32:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'SelectionSort':
main.c:39:11: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
   39 |   B=(int*)malloc(sizeof(int)*N);
      |           ^~~~~~
main.c:39:11: note: include '<stdlib.h>' or provide a declaration of 'malloc'