Language: C

#include<stdio.h>

struct card{
  char design;
  char num;
};

void bubble(struct card a[], int N){
  int i, j, temp;
  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];
        a[j-1] = a[j];
        a[j]   = temp;
      }
    }
  }
}
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] < a[minj])
        minj = j;
    }
    temp    = a[i];
    a[i]    = a[minj];
    a[minj] = temp;
  }
}
void print(struct card a[], int N){
  int i;
  for (i=0; i<N; i++) {
    if (i>0) {
      putchar(' ');
      printf("%c%c", 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;
  char ch;

  scanf("%d", &N);
  for (i=0; i<N; i++)
    scanf("%c%c", 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 'bubble':
main.c:13:18: error: incompatible types when assigning to type 'int' from type 'struct card'
   13 |         temp   = a[j-1];
      |                  ^
main.c:15:18: error: incompatible types when assigning to type 'struct card' from type 'int'
   15 |         a[j]   = temp;
      |                  ^~~~
main.c: In function 'selection':
main.c:25:16: error: invalid operands to binary < (have 'struct card' and 'struct card')
   25 |       if (a[j] < a[minj])
      |           ~~~~ ^ ~~~~~~~
      |            |      |
      |            |      struct card
      |            struct card
main.c:28:15: error: incompatible types when assigning to type 'int' from type 'struct card'
   28 |     temp    = a[i];
      |               ^
main.c:30:15: error: incompatible types when assigning to type 'struct card' from type 'int'
   30 |     a[minj] = temp;
      |               ^~~~
main.c: In function 'main':
main.c:53:3: error: unknown type name 'card'; use 'struct' keyword to refer to the type
   53 |   card c1[100], c2[100];
      |   ^~~~
      |   struct 
main.c:59:24: error: request for member 'design' in something not a structure or union
   59 |     scanf("%c%c", c1[i].design, c2[i].num);
      |                        ^
main.c:59:38: error: request for member 'num' in something not a structure or union
   59 |     scanf("%c%c", c1[i].design, c2[i].num);
      |                                      ^
main.c:64:10: error: passing argument 1 of 'bubble' from incompatible pointer type [-Wincompatible-pointer-types]
   64 |   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:65:13: error: passing argument 1 of 'selection' from incompatible pointer type [-Wincompatible-pointer-types]
   65 |   selection(c2, N);
      |             ^~
      |             |
      |             int *
main.c:20:28: note: expected 'struct card *' but argument is of type 'int *'
   20 | void selection(struct card a[], int N){
      |                ~~~~~~~~~~~~^~~
main.c:67:9: error: passing argument 1 of 'print' from incompatible pointer type [-Wincompatible-pointer-types]
   67 |   print(c1, N);
      |         ^~
      |         |
      |         int *
main.c:33:24: note: expected 'struct card *' but argument is of type 'int *'
   33 | void print(struct card a[], int N){
      |            ~~~~~~~~~~~~^~~
main.c:69:9: error: passing argument 1 of 'print' from incompatible pointer type [-Wincompatible-pointer-types]
   69 |   print(c2, N);
      |         ^~
      |         |
      |         int *
main.c:33:24: note: expected 'struct card *' but argument is of type 'int *'
   33 | void print(struct card a[], int N){
      |            ~~~~~~~~~~~~^~~
main.c:70:14: error: passing argument 1 of 'stable' from incompatible pointer type [-Wincompatible-pointer-types]
   70 |   if (stable(c1, c2, N)==1) {
      |              ^~
      |              |
      |              int *
main.c:43:24: note: expected 'struct card *' but argument is of type 'int *'
   43 | int stable(struct card c1[], struct card c2[], int N){
      |            ~~~~~~~~~~~~^~~~
main.c:70:18: error: passing argument 2 of 'stable' from incompatible pointer type [-Wincompatible-pointer-types]
   70 |   if (stable(c1, c2, N)==1) {
      |                  ^~
      |                  |
      |                  int *
main.c:43:42: note: expected 'struct card *' but argument is of type 'int *'
   43 | int stable(struct card c1[], struct card c2[], int N){
      |                              ~~~~~~~~~~~~^~~~