Language: C

#include<stdio.h>



void bubble(struct card a[], int N){
  int i, j, temp;
  char t;
  for (i=0; i<N; i++) {
    for (j=N-1; j>=i+1; j--) {
      if (a[j-1].num > a[j].num) {
        temp       = a[j-1].num;  t             = a[j-1].design;
        a[j-1].num = a[j].num;    a[j-1].design = a[j].design;
        a[j].num   = temp;        a[j].design   = t;
      }
    }
  }
}
void selection(struct card a[], int N){
  int i, j, temp, minj;
  char t;
  for (i=0; i<N; i++) {
    minj = i;
    for (j=i; j<N; j++) {
      if (a[j].num < a[minj].num)
        minj = j;
    }
    temp       = a[j-1].num;  t             = a[j-1].design;
    a[j-1].num = a[j].num;    a[j-1].design = a[j].design;
    a[j].num   = temp;        a[j].design   = t;

  }
}
void print(struct card a[], int N){
  int i;
  for (i=0; i<N; i++) {
    if (i>0) {
      putchar(' ');
      printf("%c%d", a[i].design, a[i].num);
    }
  }
  printf("\n");
}
int stable(struct card c1[], struct card c2[], int N){
  int i;
  for (i=0; i<N; i++) {
    if (c1[i].design != c2[i].design)
      return 0;
  }
  return 1;
}

int main(){
  struct card{
    char design;
    int num;
  };
  card c1[100], c2[100];
  int N, i;

  scanf("%d", &N);
  for (i=0; i<N; i++)
    scanf("%c%d", c1[i].design, c2[i].num);

  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 (stable(c1, c2, N)==1) {
    printf("Stable\n");
  } else {
    printf("Not stable\n");
  }
  return 0;
}

Compiler output:
main.c:5:25: error: array type has incomplete element type 'struct card'
    5 | void bubble(struct card a[], int N){
      |                         ^
main.c:5:20: warning: 'struct card' declared inside parameter list will not be visible outside of this definition or declaration
    5 | void bubble(struct card a[], int N){
      |                    ^~~~
main.c:18:28: error: array type has incomplete element type 'struct card'
   18 | void selection(struct card a[], int N){
      |                            ^
main.c:18:23: warning: 'struct card' declared inside parameter list will not be visible outside of this definition or declaration
   18 | void selection(struct card a[], int N){
      |                       ^~~~
main.c:33:24: error: array type has incomplete element type 'struct card'
   33 | void print(struct card a[], int N){
      |                        ^
main.c:33:19: warning: 'struct card' declared inside parameter list will not be visible outside of this definition or declaration
   33 | void print(struct card a[], int N){
      |                   ^~~~
main.c:43:24: error: array type has incomplete element type 'struct card'
   43 | int stable(struct card c1[], struct card c2[], int N){
      |                        ^~
main.c:43:42: error: array type has incomplete element type 'struct card'
   43 | int stable(struct card c1[], struct card c2[], int N){
      |                                          ^~
main.c:43:19: warning: 'struct card' declared inside parameter list will not be visible outside of this definition or declaration
   43 | int stable(struct card c1[], struct card c2[], int N){
      |                   ^~~~
main.c: In function 'main':
main.c:57:3: error: unknown type name 'card'; use 'struct' keyword to refer to the type
   57 |   card c1[100], c2[100];
      |   ^~~~
      |   struct 
main.c:62:24: error: request for member 'design' in something not a structure or union
   62 |     scanf("%c%d", c1[i].design, c2[i].num);
      |                        ^
main.c:62:38: error: request for member 'num' in something not a structure or union
   62 |     scanf("%c%d", c1[i].design, c2[i].num);
      |                                      ^
main.c:67:10: error: type of formal parameter 1 is incomplete
   67 |   bubble(c1, N);
      |          ^~
main.c:68:13: error: type of formal parameter 1 is incomplete
   68 |   selection(c2, N);
      |             ^~
main.c:70:9: error: type of formal parameter 1 is incomplete
   70 |   print(c1, N);
      |         ^~
main.c:72:9: error: type of formal parameter 1 is incomplete
   72 |   print(c2, N);
      |         ^~
main.c:73:14: error: type of formal parameter 1 is incomplete
   73 |   if (stable(c1, c2, N)==1) {
      |              ^~
main.c:73:18: error: type of formal parameter 2 is incomplete
   73 |   if (stable(c1, c2, N)==1) {
      |                  ^~