Language: C++

#include<iostream>
using namespace std;

struct Card{
    char suit;
    int value;
};

void bubbleSort(card c[],int n){
    int flag=1;
    for(int i=0;i<n-1;++i){
        if(!flag)break;
        flag=0;
        for(int j=n-1;j>i;j--){
            if(a[j]<a[j-1]){
                flag=1;
                card t=a[j];
                a[j]=a[j-1];
                a[j-1]=t;
            }
        }
    }
}

void selectionSort(card c[],int n){
   int min;
    for(int i=0;i<n-1;++i){
        min=i;
        for(int j=i+1;j<n;++j){
            if(a[j]<a[min])
                min=j;
        }
        if(min!=i){card t=a[i];a[i]=a[min];a[min]=t;}
    }
}

bool isStable(card c1[],card c2[];int n){
    for(int i=0;i<n;++i)
      if(c1[i]!=c2[i])return false;
    
    return true;
}
void print(card c[],n){
    for(int i=0;i<n;i++){
        if(i>0)cout<<' ';
        cout<<c[i].suit<<c[i].value;
    }
    cout<<endl;
}
int main(){
    int n;
    cin>>n;
    card c1[36],c2[36];
    for(int i=0;i<n;i++){
        cin>>c1.suit>>c1.value;
        c2[i]=c1[i];
    }
    
    bubbleSort(c1,n);
    selectionSort(c2,n);
    print(c1,n);
    cout<<"stable"<<endl;
    print(c2,n);
    if(isStable(c1,c2,n))
        cout<<"stable"<<endl;
        else
        cout<<"Not stable"<<endl;
    return 0;
}


Compiler output:
a.cc:9:6: error: variable or field 'bubbleSort' declared void
    9 | void bubbleSort(card c[],int n){
      |      ^~~~~~~~~~
a.cc:9:17: error: 'card' was not declared in this scope; did you mean 'Card'?
    9 | void bubbleSort(card c[],int n){
      |                 ^~~~
      |                 Card
a.cc:9:26: error: expected primary-expression before 'int'
    9 | void bubbleSort(card c[],int n){
      |                          ^~~
a.cc:25:6: error: variable or field 'selectionSort' declared void
   25 | void selectionSort(card c[],int n){
      |      ^~~~~~~~~~~~~
a.cc:25:20: error: 'card' was not declared in this scope; did you mean 'Card'?
   25 | void selectionSort(card c[],int n){
      |                    ^~~~
      |                    Card
a.cc:25:29: error: expected primary-expression before 'int'
   25 | void selectionSort(card c[],int n){
      |                             ^~~
a.cc:37:15: error: 'card' was not declared in this scope; did you mean 'Card'?
   37 | bool isStable(card c1[],card c2[];int n){
      |               ^~~~
      |               Card
a.cc:37:25: error: 'card' was not declared in this scope; did you mean 'Card'?
   37 | bool isStable(card c1[],card c2[];int n){
      |                         ^~~~
      |                         Card
a.cc:37:40: error: expected initializer before ')' token
   37 | bool isStable(card c1[],card c2[];int n){
      |                                        ^
a.cc:43:6: error: variable or field 'print' declared void
   43 | void print(card c[],n){
      |      ^~~~~
a.cc:43:12: error: 'card' was not declared in this scope; did you mean 'Card'?
   43 | void print(card c[],n){
      |            ^~~~
      |            Card
a.cc:43:21: error: 'n' was not declared in this scope
   43 | void print(card c[],n){
      |                     ^
a.cc: In function 'int main()':
a.cc:53:5: error: 'card' was not declared in this scope; did you mean 'Card'?
   53 |     card c1[36],c2[36];
      |     ^~~~
      |     Card
a.cc:55:14: error: 'c1' was not declared in this scope
   55 |         cin>>c1.suit>>c1.value;
      |              ^~
a.cc:56:9: error: 'c2' was not declared in this scope
   56 |         c2[i]=c1[i];
      |         ^~
a.cc:59:16: error: 'c1' was not declared in this scope
   59 |     bubbleSort(c1,n);
      |                ^~
a.cc:59:5: error: 'bubbleSort' was not declared in this scope
   59 |     bubbleSort(c1,n);
      |     ^~~~~~~~~~
a.cc:60:19: error: 'c2' was not declared in this scope
   60 |     selectionSort(c2,n);
      |                   ^~
a.cc:60:5: error: 'selectionSort' was not declared in this scope
   60 |     selectionSort(c2,n);
      |     ^~~~~~~~~~~~~
a.cc:61:5: error: 'print' was not declared in this scope; did you mean 'printf'?
   61 |     print(c1,n);
      |     ^~~~~
      |     printf
a.cc:64:16: error: 'isStable' cannot be used as a function
   64 |     if(isStable(c1,c2,n))
      |        ~~~~~~~~^~~~~~~~~