Language: C

#include <stdio.h>
#include <string.h>

void Bubble(int, char, int);
void Selection(int, char, int);
 
int main(void){
    char s[36],t[36];
    int a[36]={};
    int b[36]={};
    int i, N;
     
    scanf("%d",&N);
    getchar();
    for(i = 0;i < N; i++){
        scanf("%c%d",&s[i],&a[i]);
        getchar();
        b[i]=a[i];
    }
    strcpy(t,s);
     
    Bubble(N,s,a);
    for(i=0;i<N;i++){
        printf("%c%d",s[i],a[i]);
        if(i!=N-1)printf(" ");
    }
    puts("\nStable");
     

    Selection(N,t,b);
    for(i=0;i<N;i++){
        printf("%c%d",t[i],b[i]);
        if(i!=N-1)printf(" ");
    }
    puts("");
     
    if(strcmp(s,t)==0){
        puts("Stable");
    }
    else puts("Not stable");
     
    return 0;
}

void Bubble(int N,char s[],int a[]){
    int i,j,tmp;
    char x;
     
    for(i=0;i<N-1;i++){
        for(j=0;j<N-i-1;j++){
           if(a[j]>a[j+1]){
               tmp=a[j];
               a[j]=a[j+1];
               a[j+1]=tmp;
                
               x=s[j];
               s[j]=s[j+1];
               s[j+1]=x;
           } 
        }
    }
}

void Selection(int N,char s[],int a[]){
    int i,j,min,tmp;
    char x;
     
    for(i=0;i<N-1;i++){
        min=i;
        for(j=i;j<N;j++){
            if(a[j]<a[min]){
                min=j;
            }
        }
        tmp=a[i];
        a[i]=a[min];
        a[min]=tmp;
         
        x=s[i];
        s[i]=s[min];
        s[min]=x;
    }
}

Compiler output:
main.c: In function 'main':
main.c:22:14: error: passing argument 2 of 'Bubble' makes integer from pointer without a cast [-Wint-conversion]
   22 |     Bubble(N,s,a);
      |              ^
      |              |
      |              char *
main.c:4:18: note: expected 'char' but argument is of type 'char *'
    4 | void Bubble(int, char, int);
      |                  ^~~~
main.c:22:16: error: passing argument 3 of 'Bubble' makes integer from pointer without a cast [-Wint-conversion]
   22 |     Bubble(N,s,a);
      |                ^
      |                |
      |                int *
main.c:4:24: note: expected 'int' but argument is of type 'int *'
    4 | void Bubble(int, char, int);
      |                        ^~~
main.c:30:17: error: passing argument 2 of 'Selection' makes integer from pointer without a cast [-Wint-conversion]
   30 |     Selection(N,t,b);
      |                 ^
      |                 |
      |                 char *
main.c:5:21: note: expected 'char' but argument is of type 'char *'
    5 | void Selection(int, char, int);
      |                     ^~~~
main.c:30:19: error: passing argument 3 of 'Selection' makes integer from pointer without a cast [-Wint-conversion]
   30 |     Selection(N,t,b);
      |                   ^
      |                   |
      |                   int *
main.c:5:27: note: expected 'int' but argument is of type 'int *'
    5 | void Selection(int, char, int);
      |                           ^~~
main.c: At top level:
main.c:45:6: error: conflicting types for 'Bubble'; have 'void(int,  char *, int *)'
   45 | void Bubble(int N,char s[],int a[]){
      |      ^~~~~~
main.c:4:6: note: previous declaration of 'Bubble' with type 'void(int,  char,  int)'
    4 | void Bubble(int, char, int);
      |      ^~~~~~
main.c:64:6: error: conflicting types for 'Selection'; have 'void(int,  char *, int *)'
   64 | void Selection(int N,char s[],int a[]){
      |      ^~~~~~~~~
main.c:5:6: note: previous declaration of 'Selection' with type 'void(int,  char,  int)'
    5 | void Selection(int, char, int);
      |      ^~~~~~~~~