Language: C++

#include <iostream>
using namespace std;

struct card{
	int flag;
	string data;
};

card *card1[36],*card2[36];
void BubbleSort(*struct,int);
void SelectionSort(*struct,int);
int CheckStability(*struct,int);

int main(){
 
    int i,n;
	
    cin>>n;
	if(n==1){
	cin>>card[0].data;
	cout<<card[0].data<<endl;
	cout<<card[0].data<<endl;
	return 0;
	}
	
    for(i=0; i<n; i++){
		card1[i].flag=i+1;
		cin>>card[i].data;
    }
     
    BubbleSort(*card1,n);
 
    for(i=0; i<n; i++){
        cout<<card2[i].data;
        if(i==n-1)cout<<endl;
        else cout<<" ";
    }
	
	if(CheckStability(*card2,n)==0)cout<<"Stable"<<endl;
	else cout<<"Not Stable"<<endl;

	SelectionSort(*card1,n);
	
	for(i=0; i<n; i++){
		cout<<card2[i].data;
		if(i==n-1)cout<<endl;
		else cout<<" ";
	}

	if(CheckStability(*card2,n)==0)cout<<"Stable"<<endl;
	else cout<<"Not Stable"<<endl;
	
return 0;

}
 
void BubbleSort(struct *card,int n){
 
    int i,j,suspend;
     
    for(i=0; i<n; i++){
        for(j=n-1; j>=i+1; j--){
            if(data[j]<data[j-1]){
                suspend=data[j];
                data[j]=data[j-1];
                data[j-1]=suspend;
                count++;
            }
        }
    }
}

void SelectionSort(struct *card,int n){
 
    int i,j,mini,suspend;
     
    for(i=0; i<n; i++){
 
        mini=i;
 
        for(j=i; j<n; j++){
            if(data[j]<data[mini]){
                mini=j;
			}
		}
 
        if(data[i]>data[mini]){
        suspend=data[i];
        data[i]=data[mini];
        data[mini]=suspend;
        count++;
		}

	}
}

int CheckStability(struct *card,int n){

	int i,flag=0;
	
	for(i=0; i<n){
		if(card.data[i]==card.data[i+1])
			if(card.flag[i]>card.flag[i+1])flag++;
	}



}

Compiler output:
a.cc:10:6: error: variable or field 'BubbleSort' declared void
   10 | void BubbleSort(*struct,int);
      |      ^~~~~~~~~~
a.cc:10:18: error: expected primary-expression before 'struct'
   10 | void BubbleSort(*struct,int);
      |                  ^~~~~~
a.cc:10:25: error: expected primary-expression before 'int'
   10 | void BubbleSort(*struct,int);
      |                         ^~~
a.cc:11:6: error: variable or field 'SelectionSort' declared void
   11 | void SelectionSort(*struct,int);
      |      ^~~~~~~~~~~~~
a.cc:11:21: error: expected primary-expression before 'struct'
   11 | void SelectionSort(*struct,int);
      |                     ^~~~~~
a.cc:11:28: error: expected primary-expression before 'int'
   11 | void SelectionSort(*struct,int);
      |                            ^~~
a.cc:12:21: error: expected primary-expression before 'struct'
   12 | int CheckStability(*struct,int);
      |                     ^~~~~~
a.cc:12:28: error: expected primary-expression before 'int'
   12 | int CheckStability(*struct,int);
      |                            ^~~
a.cc:12:31: error: expression list treated as compound expression in initializer [-fpermissive]
   12 | int CheckStability(*struct,int);
      |                               ^
a.cc: In function 'int main()':
a.cc:20:18: error: expected primary-expression before '[' token
   20 |         cin>>card[0].data;
      |                  ^
a.cc:21:19: error: expected primary-expression before '[' token
   21 |         cout<<card[0].data<<endl;
      |                   ^
a.cc:22:19: error: expected primary-expression before '[' token
   22 |         cout<<card[0].data<<endl;
      |                   ^
a.cc:27:26: error: request for member 'flag' in 'card1[i]', which is of pointer type 'card*' (maybe you meant to use '->' ?)
   27 |                 card1[i].flag=i+1;
      |                          ^~~~
a.cc:28:26: error: expected primary-expression before '[' token
   28 |                 cin>>card[i].data;
      |                          ^
a.cc:31:5: error: 'BubbleSort' was not declared in this scope
   31 |     BubbleSort(*card1,n);
      |     ^~~~~~~~~~
a.cc:34:24: error: request for member 'data' in 'card2[i]', which is of pointer type 'card*' (maybe you meant to use '->' ?)
   34 |         cout<<card2[i].data;
      |                        ^~~~
a.cc:39:26: error: 'CheckStability' cannot be used as a function
   39 |         if(CheckStability(*card2,n)==0)cout<<"Stable"<<endl;
      |            ~~~~~~~~~~~~~~^~~~~~~~~~
a.cc:42:9: error: 'SelectionSort' was not declared in this scope
   42 |         SelectionSort(*card1,n);
      |         ^~~~~~~~~~~~~
a.cc:45:32: error: request for member 'data' in 'card2[i]', which is of pointer type 'card*' (maybe you meant to use '->' ?)
   45 |                 cout<<card2[i].data;
      |                                ^~~~
a.cc:50:26: error: 'CheckStability' cannot be used as a function
   50 |         if(CheckStability(*card2,n)==0)cout<<"Stable"<<endl;
      |            ~~~~~~~~~~~~~~^~~~~~~~~~
a.cc: At global scope:
a.cc:57:6: error: variable or field 'BubbleSort' declared void
   57 | void BubbleSort(struct *card,int n){
      |      ^~~~~~~~~~
a.cc:57:17: error: expected primary-expression before 'struct'
   57 | void BubbleSort(struct *card,int n){
      |                 ^~~~~~
a.cc:57:30: error: expected primary-expression before 'int'
   57 | void BubbleSort(struct *card,int n){
      |                              ^~~
a.cc:73:6: error: variable or field 'SelectionSort' declared void
   73 | void SelectionSort(struct *card,int n){
      |      ^~~~~~~~~~~~~
a.cc:73:20: error: expected primary-expression before 'struct'
   73 | void SelectionSort(struct *card,int n){
      |                    ^~~~~~
a.cc:73:33: error: expected primary-expression before 'int'
   73 | void SelectionSort(struct *card,int n){
      |                                 ^~~
a.cc:97:5: error: redefinition of 'int CheckStability'
   97 | int CheckStability(struct *card,int n){
      |     ^~~~~~~~~~~~~~
a.cc:12:5: note: 'int CheckStability' previously defined here
   12 | int CheckStability(*struct,int);
      |     ^~~~~~~~~~~~~~
a.cc:97:20: error: expected primary-expression before 'struct'
   97 | int CheckStability(struct *card,int n){
      |                    ^~~~~~
a.cc:97:33: error: expected primary-expression before 'int'
   97 | int CheckStability(struct *card,int n){
      |                                 ^~~