Language: C

#include<stdio.h>
typedef Card{
  char suit,value;
}Card;

void bubble(struct Card A[],int N){
  int i,j;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(A[j].value <A[j-1].value){
	Card t=A[j];
	A[j]=A[j-1];
	A[j-1]=t;
	  }
    }
  }
}

void selection(struct Card A[],int N){
  int i,j,min;
  for(i=0;i<N;i++){
    min=i;
    for(j=i;j<N;j++){
      if(A[j].value < A[min].value)min=j;
    }
    Card t=A[i];
    A[i]=A[min];
    A[min]=t;
  }
}

void print(struct Card A[],int N){
  for(i=0;i<N;i++){
    if(i>0)printf(" ");
    printf("%d%d",A[i].suit,A[i].value);
  }
  printf("\n");
}

bool isStable(struct Card C1[],struct Card C2[],int N){
  int i;
  for(i=0;i<N;i++){
    if(C1[i].suit!=C2[i].suit)return false;
  }
  return true;
}

int main(){
  Card C1[100],C2[100];
  int N;
  char ch;
  scanf("%d",&N);
  for(i=0;i<N;i++){
    scanf("%d%d",&C1[i].suit,&C1[i].value);
  }
  for(i=0;i<N;i++)C2[i]=C1[i];

  bubble(C1,N);
  selection(C2,N);

  print(C1,N);
  printf("Stable\n");
  print(C2,N);
  if(isStable(C1,C2,N)){
    printf("Stable\n");
  }else{
    printf("Not stable\n");
  }
  return 0;
}

Compiler output:
main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    2 | typedef Card{
      |             ^
main.c:4:2: warning: data definition has no type or storage class
    4 | }Card;
      |  ^~~~
main.c:4:2: error: type defaults to 'int' in declaration of 'Card' [-Wimplicit-int]
main.c:6:25: error: array type has incomplete element type 'struct Card'
    6 | void bubble(struct Card A[],int N){
      |                         ^
main.c:6:20: warning: 'struct Card' declared inside parameter list will not be visible outside of this definition or declaration
    6 | void bubble(struct Card A[],int N){
      |                    ^~~~
main.c: In function 'bubble':
main.c:11:13: error: expected ';' before 't'
   11 |         Card t=A[j];
      |             ^~
      |             ;
main.c:13:16: error: 't' undeclared (first use in this function)
   13 |         A[j-1]=t;
      |                ^
main.c:13:16: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:19:28: error: array type has incomplete element type 'struct Card'
   19 | void selection(struct Card A[],int N){
      |                            ^
main.c:19:23: warning: 'struct Card' declared inside parameter list will not be visible outside of this definition or declaration
   19 | void selection(struct Card A[],int N){
      |                       ^~~~
main.c: In function 'selection':
main.c:26:9: error: expected ';' before 't'
   26 |     Card t=A[i];
      |         ^~
      |         ;
main.c:28:12: error: 't' undeclared (first use in this function)
   28 |     A[min]=t;
      |            ^
main.c: At top level:
main.c:32:24: error: array type has incomplete element type 'struct Card'
   32 | void print(struct Card A[],int N){
      |                        ^
main.c:32:19: warning: 'struct Card' declared inside parameter list will not be visible outside of this definition or declaration
   32 | void print(struct Card A[],int N){
      |                   ^~~~
main.c: In function 'print':
main.c:33:7: error: 'i' undeclared (first use in this function)
   33 |   for(i=0;i<N;i++){
      |       ^
main.c: At top level:
main.c:40:1: error: unknown type name 'bool'
   40 | bool isStable(struct Card C1[],struct Card C2[],int N){
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | typedef Card{
main.c:40:27: error: array type has incomplete element type 'struct Card'
   40 | bool isStable(struct Card C1[],struct Card C2[],int N){
      |                           ^~
main.c:40:44: error: array type has incomplete element type 'struct Card'
   40 | bool isStable(struct Card C1[],struct Card C2[],int N){
      |                                            ^~
main.c:40:22: warning: 'struct Card' declared inside parameter list will not be visible outside of this definition or declaration
   40 | bool isStable(struct Card C1[],struct Card C2[],int N){
      |                      ^~~~
main.c: In function 'isStable':
main.c:43:38: error: 'false' undeclared (first use in this function)
   43 |     if(C1[i].suit!=C2[i].suit)return false;
      |                                      ^~~~~
main.c:43:38: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:45:10: error: 'true' undeclared (first use in this function)
   45 |   return true;
      |          ^~~~
main.c:45:10: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'main':
main.c:49:7: error: expected ';' before 'C1'
   49 |   Card C1[100],C2[100];
      |       ^~~
      |       ;
main.c:53:7: error: 'i' undeclared (first use in this function)
   53 |   for(i=0;i<N;i++){
      |       ^
main.c:54:19: error: 'C1' undeclared (first use in this function)
   54 |     scanf("%d%d",&C1[i].suit,&C1[i].value);
      |                   ^~
main.c:56:19: error: 'C2' undeclared (first use in this function)
   56 |   for(i=0;i<N;i++)C2[i]=C1[i];
      |                   ^~
main.c:58:10: error: type of formal parameter 1 is incomplete
   58 |   bubble(C1,N);
      |          ^~
main.c:59:13: error: type of formal parameter 1 is incomplete
   59 |   selection(C2,N);
      |             ^~
main.c:61:9: error: type of formal parameter 1 is incomplete
   61 |   print(C1,N);
      |         ^~
main.c:63:9: error: type of formal parameter 1 is incomplete
   63 |   print(C2,N);
      |         ^~
main.c:64:15: error: type of formal parameter 1 is incomplete
   64 |   if(isStable(C1,C2,N)){
      |               ^~
main.c:64:18: error: type of formal parameter 2 is incomplete
   64 |   if(isStable(C1,C2,N)){
      |                  ^~