Language: C

#include<stdio.h>

struct card{
  char design;
  int num;
};

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;
  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(){
  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: In function 'selection':
main.c:29:31: error: 't' undeclared (first use in this function)
   29 |     temp       = a[j-1].num;  t             = a[j-1].design;
      |                               ^
main.c:29:31: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:55:3: error: unknown type name 'card'; use 'struct' keyword to refer to the type
   55 |   card c1[100], c2[100];
      |   ^~~~
      |   struct 
main.c:60:24: error: request for member 'design' in something not a structure or union
   60 |     scanf("%c%d", c1[i].design, c2[i].num);
      |                        ^
main.c:60:38: error: request for member 'num' in something not a structure or union
   60 |     scanf("%c%d", c1[i].design, c2[i].num);
      |                                      ^
main.c:65:10: error: passing argument 1 of 'bubble' from incompatible pointer type [-Wincompatible-pointer-types]
   65 |   bubble(c1, N);
      |          ^~
      |          |
      |          int *
main.c:8:25: note: expected 'struct card *' but argument is of type 'int *'
    8 | void bubble(struct card a[], int N){
      |             ~~~~~~~~~~~~^~~
main.c:66:13: error: passing argument 1 of 'selection' from incompatible pointer type [-Wincompatible-pointer-types]
   66 |   selection(c2, N);
      |             ^~
      |             |
      |             int *
main.c:21:28: note: expected 'struct card *' but argument is of type 'int *'
   21 | void selection(struct card a[], int N){
      |                ~~~~~~~~~~~~^~~
main.c:68:9: error: passing argument 1 of 'print' from incompatible pointer type [-Wincompatible-pointer-types]
   68 |   print(c1, N);
      |         ^~
      |         |
      |         int *
main.c:35:24: note: expected 'struct card *' but argument is of type 'int *'
   35 | void print(struct card a[], int N){
      |            ~~~~~~~~~~~~^~~
main.c:70:9: error: passing argument 1 of 'print' from incompatible pointer type [-Wincompatible-pointer-types]
   70 |   print(c2, N);
      |         ^~
      |         |
      |         int *
main.c:35:24: note: expected 'struct card *' but argument is of type 'int *'
   35 | void print(struct card a[], int N){
      |            ~~~~~~~~~~~~^~~
main.c:71:14: error: passing argument 1 of 'stable' from incompatible pointer type [-Wincompatible-pointer-types]
   71 |   if (stable(c1, c2, N)==1) {
      |              ^~
      |              |
      |              int *
main.c:45:24: note: expected 'struct card *' but argument is of type 'int *'
   45 | int stable(struct card c1[], struct card c2[], int N){
      |            ~~~~~~~~~~~~^~~~
main.c:71:18: error: passing argument 2 of 'stable' from incompatible pointer type [-Wincompatible-pointer-types]
   71 |   if (stable(c1, c2, N)==1) {
      |                  ^~
      |                  |
      |                  int *
main.c:45:42: note: expected 'struct card *' but argument is of type 'int *'
   45 | int stable(struct card c1[], struct card c2[], int N){
      |                              ~~~~~~~~~~~~^~~~