criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
using namespace std;
 
struct Card{char suit,value;};
 
void bubble(struct Card A[],int N){
  for(int i=0;i<N;i++){
    for(int j=N-1;j>=i;j--){
      if(A[j].value<A[j-1].value){
        Card t=A[j];A[j]=A[j-1];A[j-1]=t;
      }
    }
  }
}
 
void selectionSort(struct CardA[],int N){
  for(int i=0;i<N;i++){
    int minj=i;
    for(int j=i;j<N;j++){
      if(A[j].value<A[minj].value)minj=j;
    }
    Card t=A[i];A[i]=A[minj];A[minj]=t;
  }
}
 
void print(struct Card A[],int N){
  for(int i=0;i<N;i++){
    if(i>0)cout<<" ";
    cout<<A[i].suit<<A[i].value;
  }
  cout<<endl;
}
 
bool isStable(struct Card C1[],struct CardC2[],int N){
  for(int i=0;i<N;i++){
    if(C1[i].suit!=C2[i].suit)return false;
  }
  return true;
}
 
int main(){
  Card C1[100],C2[100];
  int N;
  char ch;
 
  cin>>N;
  for(int i=0;i<N;i++){
    cin>>C1[i].suit>>C1[i].value;
  }
 
  for(int i=0;i<N;i++)C2[i]=C1[i];
 
  bubble(C1,N);
  selection(C2,N)
 
  print(C1,N);
  if(isStable(C1,C2,N)){
    cout<<"Stable"<<endl;
  }else{
    cout<<"Not stable"<<endl;
  }
 
  return 0;
}

Compiler output:
a.cc: In function 'void selectionSort(CardA*, int)':
a.cc:20:10: error: 'A' was not declared in this scope
   20 |       if(A[j].value<A[minj].value)minj=j;
      |          ^
a.cc:22:12: error: 'A' was not declared in this scope
   22 |     Card t=A[i];A[i]=A[minj];A[minj]=t;
      |            ^
a.cc: In function 'bool isStable(Card*, CardC2*, int)':
a.cc:36:20: error: 'C2' was not declared in this scope; did you mean 'C1'?
   36 |     if(C1[i].suit!=C2[i].suit)return false;
      |                    ^~
      |                    C1
a.cc: In function 'int main()':
a.cc:54:3: error: 'selection' was not declared in this scope; did you mean 'select'?
   54 |   selection(C2,N)
      |   ^~~~~~~~~
      |   select
a.cc:57:18: error: cannot convert 'Card*' to 'CardC2*'
   57 |   if(isStable(C1,C2,N)){
      |                  ^~
      |                  |
      |                  Card*
a.cc:34:32: note:   initializing argument 2 of 'bool isStable(Card*, CardC2*, int)'
   34 | bool isStable(struct Card C1[],struct CardC2[],int N){
      |                                ^~~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
  
struct Card{char suit,value;};
  
void bubble(struct Card A[],int N){
  for(int i=0;i<N;i++){
    for(int j=N-1;j>=i;j--){
      if(A[j].value<A[j-1].value){
        Card t=A[j];A[j]=A[j-1];A[j-1]=t;
      }
    }
  }
}
  
void selection(struct CardA[],int N){
  for(int i=0;i<N;i++){
    int minj=i;
    for(int j=i;j<N;j++){
      if(A[j].value<A[minj].value)minj=j;
    }
    Card t=A[i];A[i]=A[minj];A[minj]=t;
  }
}
  
void print(struct Card A[],int N){
  for(int i=0;i<N;i++){
    if(i>0)cout<<" ";
    cout<<A[i].suit<<A[i].value;
  }
  cout<<endl;
}
  
bool isStable(struct Card C1[],struct CardC2[],int N){
  for(int i=0;i<N;i++){
    if(C1[i].suit!=C2[i].suit)return false;
  }
  return true;
}
  
int main(){
  Card C1[100],C2[100];
  int N;
  char ch;
  
  cin>>N;
  for(int i=0;i<N;i++){
    cin>>C1[i].suit>>C1[i].value;
  }
  
  for(int i=0;i<N;i++)C2[i]=C1[i];
  
  bubble(C1,N);
  selection(C2,N)
  
  print(C1,N);
  if(isStable(C1,C2,N)){
    cout<<"Stable"<<endl;
  }else{
    cout<<"Not stable"<<endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'void selection(CardA*, int)':
a.cc:20:10: error: 'A' was not declared in this scope
   20 |       if(A[j].value<A[minj].value)minj=j;
      |          ^
a.cc:22:12: error: 'A' was not declared in this scope
   22 |     Card t=A[i];A[i]=A[minj];A[minj]=t;
      |            ^
a.cc: In function 'bool isStable(Card*, CardC2*, int)':
a.cc:36:20: error: 'C2' was not declared in this scope; did you mean 'C1'?
   36 |     if(C1[i].suit!=C2[i].suit)return false;
      |                    ^~
      |                    C1
a.cc: In function 'int main()':
a.cc:54:13: error: cannot convert 'Card*' to 'CardA*'
   54 |   selection(C2,N)
      |             ^~
      |             |
      |             Card*
a.cc:16:16: note:   initializing argument 1 of 'void selection(CardA*, int)'
   16 | void selection(struct CardA[],int N){
      |                ^~~~~~~~~~~~~~
a.cc:57:18: error: cannot convert 'Card*' to 'CardC2*'
   57 |   if(isStable(C1,C2,N)){
      |                  ^~
      |                  |
      |                  Card*
a.cc:34:32: note:   initializing argument 2 of 'bool isStable(Card*, CardC2*, int)'
   34 | bool isStable(struct Card C1[],struct CardC2[],int N){
      |                                ^~~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
  
struct Card{char suit,value;};
  
void bubble(struct Card A[],int N){
  for(int i=0;i<N;i++){
    for(int j=N-1;j>=i;j--){
      if(A[j].value<A[j-1].value){
        Card t=A[j];A[j]=A[j-1];A[j-1]=t;
      }
    }
  }
}
  
void selection(struct CardA[],int N){
  for(int i=0;i<N;i++){
    int minj=i;
    for(int j=i;j<N;j++){
      if(A[j].value<A[minj].value)minj=j;
    }
    Card t=A[i];A[i]=A[minj];A[minj]=t;
  }
}

void print(struct Card A[],int N){
  for(int i=0;i<N;i++){
    if(i>0)cout<<" ";
    cout<<A[i].suit<<A[i].value;
  }
  cout<<endl;
}
  
bool isStable(struct Card C1[],struct CardC2[],int N){
  for(int i=0;i<N;i++){
    if(C1[i].suit!=C2[i].suit)return false;
  }
  return true;
}
  
int main(){
  Card C1[100],C2[100];
  int N;
  char ch;
  
  cin>>N;
  for(int i=0;i<N;i++){
    cin>>C1[i].suit>>C1[i].value;
  }
  
  for(int i=0;i<N;i++)C2[i]=C1[i];
  
  bubble(C1,N);
  selection(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: In function 'void selection(CardA*, int)':
a.cc:20:10: error: 'A' was not declared in this scope
   20 |       if(A[j].value<A[minj].value)minj=j;
      |          ^
a.cc:22:12: error: 'A' was not declared in this scope
   22 |     Card t=A[i];A[i]=A[minj];A[minj]=t;
      |            ^
a.cc: In function 'bool isStable(Card*, CardC2*, int)':
a.cc:36:20: error: 'C2' was not declared in this scope; did you mean 'C1'?
   36 |     if(C1[i].suit!=C2[i].suit)return false;
      |                    ^~
      |                    C1
a.cc: In function 'int main()':
a.cc:54:13: error: cannot convert 'Card*' to 'CardA*'
   54 |   selection(C2,N)
      |             ^~
      |             |
      |             Card*
a.cc:16:16: note:   initializing argument 1 of 'void selection(CardA*, int)'
   16 | void selection(struct CardA[],int N){
      |                ^~~~~~~~~~~~~~
a.cc:59:18: error: cannot convert 'Card*' to 'CardC2*'
   59 |   if(isStable(C1,C2,N)){
      |                  ^~
      |                  |
      |                  Card*
a.cc:34:32: note:   initializing argument 2 of 'bool isStable(Card*, CardC2*, int)'
   34 | bool isStable(struct Card C1[],struct CardC2[],int N){
      |                                ^~~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
  
struct Card{char suit,value;};
  
void bubble(struct Card A[],int N){
  for(int i=0;i<N;i++){
    for(int j=N-1;j>=i;j--){
      if(A[j].value<A[j-1].value){
        Card t=A[j];A[j]=A[j-1];A[j-1]=t;
      }
    }
  }
}
  
void selection(struct Card A[],int N){
  for(int i=0;i<N;i++){
    int minj=i;
    for(int j=i;j<N;j++){
      if(A[j].value<A[minj].value)minj=j;
    }
    Card t=A[i];A[i]=A[minj];A[minj]=t;
  }
}

void print(struct Card A[],int N){
  for(int i=0;i<N;i++){
    if(i>0)cout<<" ";
    cout<<A[i].suit<<A[i].value;
  }
  cout<<endl;
}
  
bool isStable(struct Card C1[],struct CardC2[],int N){
  for(int i=0;i<N;i++){
    if(C1[i].suit!=C2[i].suit)return false;
  }
  return true;
}
  
int main(){
  Card C1[100],C2[100];
  int N;
  char ch;
  
  cin>>N;
  for(int i=0;i<N;i++){
    cin>>C1[i].suit>>C1[i].value;
  }
  
  for(int i=0;i<N;i++)C2[i]=C1[i];
  
  bubble(C1,N);
  selection(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: In function 'bool isStable(Card*, CardC2*, int)':
a.cc:36:20: error: 'C2' was not declared in this scope; did you mean 'C1'?
   36 |     if(C1[i].suit!=C2[i].suit)return false;
      |                    ^~
      |                    C1
a.cc: In function 'int main()':
a.cc:54:18: error: expected ';' before 'print'
   54 |   selection(C2,N)
      |                  ^
      |                  ;
   55 | 
   56 |   print(C1,N);
      |   ~~~~~           
a.cc:59:18: error: cannot convert 'Card*' to 'CardC2*'
   59 |   if(isStable(C1,C2,N)){
      |                  ^~
      |                  |
      |                  Card*
a.cc:34:32: note:   initializing argument 2 of 'bool isStable(Card*, CardC2*, int)'
   34 | bool isStable(struct Card C1[],struct CardC2[],int N){
      |                                ^~~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
  
struct Card { char suit, value; };

void bubble(struct Card A[], int N){
	for(int i=0;i<N;i++){
		for(int j=N-1;j>=i;j--){
			if ( A[j].value<A[j-1].value ){
			        Card t = A[j]; A[j] = A[j - 1]; A[j - 1] = t;
			}
		}
	}
}
  
void selection(struct CardA[],int N){
	for ( int i = 0; i < N; i++){
		int minj = i;
		for ( int j = i; j < N; j++){
			if ( A[j].value < A[minj].value) minj = j;
		}
		Card t=A[i];A[i]=A[minj];A[minj]=t;
	}
}

void print(struct Card A[],int N){
	for(int i=0;i<N;i++){
		if(i>0)cout<<" ";
		cout<<A[i].suit<<A[i].value;
	}
	cout<<endl;
}
  
bool isStable(struct Card C1[],struct CardC2[],int N){
	for(int i=0;i<N;i++){
		if(C1[i].suit!=C2[i].suit)return false;
	}
	return true;
}
  
int main(){
	Card C1[100],C2[100];
	int N;
	char ch;
  
	cin>>N;
	for(int i=0;i<N;i++){
  		cin>>C1[i].suit>>C1[i].value;
	}
  
	for(int i=0;i<N;i++)C2[i]=C1[i];
  
	bubble(C1,N);
	selection(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: In function 'void selection(CardA*, int)':
a.cc:20:30: error: 'A' was not declared in this scope
   20 |                         if ( A[j].value < A[minj].value) minj = j;
      |                              ^
a.cc:22:24: error: 'A' was not declared in this scope
   22 |                 Card t=A[i];A[i]=A[minj];A[minj]=t;
      |                        ^
a.cc: In function 'bool isStable(Card*, CardC2*, int)':
a.cc:36:32: error: 'C2' was not declared in this scope; did you mean 'C1'?
   36 |                 if(C1[i].suit!=C2[i].suit)return false;
      |                                ^~
      |                                C1
a.cc: In function 'int main()':
a.cc:54:19: error: cannot convert 'Card*' to 'CardA*'
   54 |         selection(C2,N)
      |                   ^~
      |                   |
      |                   Card*
a.cc:16:16: note:   initializing argument 1 of 'void selection(CardA*, int)'
   16 | void selection(struct CardA[],int N){
      |                ^~~~~~~~~~~~~~
a.cc:59:24: error: cannot convert 'Card*' to 'CardC2*'
   59 |         if(isStable(C1,C2,N)){
      |                        ^~
      |                        |
      |                        Card*
a.cc:34:32: note:   initializing argument 2 of 'bool isStable(Card*, CardC2*, int)'
   34 | bool isStable(struct Card C1[],struct CardC2[],int N){
      |                                ^~~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
  
struct Card { char suit, value; };

void bubble(struct Card A[], int N){
	for(int i=0;i<N;i++){
		for(int j=N-1;j>=i;j--){
			if ( A[j].value<A[j-1].value ){
			        Card t = A[j]; A[j] = A[j - 1]; A[j - 1] = t;
			}
		}
	}
}
  
void selection(struct CardA[],int N){
	for ( int i = 0; i < N; i++){
		int minj = i;
		for ( int j = i; j < N; j++){
			if ( A[j].value < A[minj].value) minj = j;
		}
		Card t=A[i];A[i]=A[minj];A[minj]=t;
	}
}

void print(struct Card A[],int N){
	for(int i=0;i<N;i++){
		if(i>0)cout<<" ";
		cout<<A[i].suit<<A[i].value;
	}
	cout<<endl;
}
  
bool isStable(struct Card C1[],struct CardC2[],int N){
	for(int i=0;i<N;i++){
		if(C1[i].suit!=C2[i].suit)return false;
	}
	return true;
}
  
int main(){
	Card C1[100],C2[100];
	int N,A[100];
	char ch;
  
	cin>>N;
	for(int i=0;i<N;i++){
  		cin>>C1[i].suit>>C1[i].value;
	}
  
	for(int i=0;i<N;i++)C2[i]=C1[i];
  
	bubble(C1,N);
	selection(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: In function 'void selection(CardA*, int)':
a.cc:20:30: error: 'A' was not declared in this scope
   20 |                         if ( A[j].value < A[minj].value) minj = j;
      |                              ^
a.cc:22:24: error: 'A' was not declared in this scope
   22 |                 Card t=A[i];A[i]=A[minj];A[minj]=t;
      |                        ^
a.cc: In function 'bool isStable(Card*, CardC2*, int)':
a.cc:36:32: error: 'C2' was not declared in this scope; did you mean 'C1'?
   36 |                 if(C1[i].suit!=C2[i].suit)return false;
      |                                ^~
      |                                C1
a.cc: In function 'int main()':
a.cc:54:19: error: cannot convert 'Card*' to 'CardA*'
   54 |         selection(C2,N)
      |                   ^~
      |                   |
      |                   Card*
a.cc:16:16: note:   initializing argument 1 of 'void selection(CardA*, int)'
   16 | void selection(struct CardA[],int N){
      |                ^~~~~~~~~~~~~~
a.cc:59:24: error: cannot convert 'Card*' to 'CardC2*'
   59 |         if(isStable(C1,C2,N)){
      |                        ^~
      |                        |
      |                        Card*
a.cc:34:32: note:   initializing argument 2 of 'bool isStable(Card*, CardC2*, int)'
   34 | bool isStable(struct Card C1[],struct CardC2[],int N){
      |                                ^~~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
  
struct Card { char suit, value; };

void bubble(struct Card A[], int N){
	for(int i=0;i<N;i++){
		for(int j=N-1;j>=i;j--){
			if ( A[j].value<A[j-1].value ){
			        Card t=A[j];A[j]=A[j-1];A[j-1]=t;
			}
		}
	}
}
  
void selection(struct Card A[],int N){
	for ( int i=0;i<N;i++){
		int minj=i;
		for(int j=i;j<N;j++){
			if(A[j].value<A[minj].value)minj=j;
		}
		Card t=A[i];A[i]=A[minj];A[minj]=t;
	}
}

void print(struct Card A[],int N){
	for(int i=0;i<N;i++){
		if(i>0)cout<<" ";
		cout<<A[i].suit<<A[i].value;
	}
	cout<<endl;
}
  
bool isStable(struct Card C1[],struct Card C2[],int N){
	for(int i=0;i<N;i++){
		if(C1[i].suit!=C2[i].suit)return false;
	}
	return true;
}
  
int main(){
	Card C1[100],C2[100];
	int N,A[100];
	char ch;
  
	cin>>N;
	for(int i=0;i<N;i++){
  		cin>>C1[i].suit>>C1[i].value;
	}
  
	for(int i=0;i<N;i++)C2[i]=C1[i];
  
	bubble(C1,N);
	selection(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: In function 'int main()':
a.cc:54:24: error: expected ';' before 'print'
   54 |         selection(C2,N)
      |                        ^
      |                        ;
   55 | 
   56 |         print(C1,N);
      |         ~~~~~
Language: C++

#include<stdio.h>
int main(void) {
    int i = 0, j, k, n, m, l, key, minj;
    card a[100], b[100], c[100];
    scanf("%d", &n);
    key = n;
    while ( key-- ) {
        scanf("%d", &a[i]);
        b[i] = a[i];
        c[i] = a[i]
        i++;
    }
    /*BubbleSort*/
    for ( i = 0; i <= n ; i++ ) {
        for ( j = n - 1; j > i; j-- ) {
            if ( b[j].value > b[j - 1].value ) {
                key = b[j];
                b[j] = b[j - 1];
                b[j - 1] = key;
            }
        }
    }
    /*SelectionSort*/
    for ( i = 0; i < n; i++ ) {
        minj = i;
        for ( j = i; j < n - 1; j++ ) {
            if ( c[j].value < c[minj].value ) minj = j;
            key = c[i];
            c[i] = c[minj];
            c[minj] = key;
        }
    }

    key = n; i = 0;
    while ( key-- ) {
        if ( b[i] != c[i] ) break; 
        i++;
    }
    printf("%d", )
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'card' was not declared in this scope
    4 |     card a[100], b[100], c[100];
      |     ^~~~
a.cc:8:22: error: 'a' was not declared in this scope
    8 |         scanf("%d", &a[i]);
      |                      ^
a.cc:9:9: error: 'b' was not declared in this scope
    9 |         b[i] = a[i];
      |         ^
a.cc:10:9: error: 'c' was not declared in this scope
   10 |         c[i] = a[i]
      |         ^
a.cc:16:18: error: 'b' was not declared in this scope
   16 |             if ( b[j].value > b[j - 1].value ) {
      |                  ^
a.cc:27:18: error: 'c' was not declared in this scope
   27 |             if ( c[j].value < c[minj].value ) minj = j;
      |                  ^
a.cc:28:19: error: 'c' was not declared in this scope
   28 |             key = c[i];
      |                   ^
a.cc:36:14: error: 'b' was not declared in this scope
   36 |         if ( b[i] != c[i] ) break;
      |              ^
a.cc:36:22: error: 'c' was not declared in this scope
   36 |         if ( b[i] != c[i] ) break;
      |                      ^
a.cc:39:18: error: expected primary-expression before ')' token
   39 |     printf("%d", )
      |                  ^
Language: C++

#include<bits/stdc++.h>
#define MAX 100
using namespace std;

struct Card { char suit, value; };

void bubbleSort(struct Card C[], int N) {
  for (int i = 0; i < N; i++) {
    for (int j = N - 1; j >= i + 1; j--) {
      if (C[j].value < C[j - 1].value) {
        Card temp = C[j];
        C[j] = C[j - 1];
        C[j - 1] = temp;
      }
    }
  }
}

void selectionSort(struct Card C[], int N) {
  for (int i = 0; i < N; i++) {
    int minj = i;
    for (int j = i; j < N; j++) {
      if (C[j].value < C[minj].value) {
        minj = j;
      }
    }
    Card temp = C[i];
    C[i] = C[minj];
    C[minj] = temp;
  }
}

void print(struct Card C[], int N) [
  for (int i = 0; i < N; i++) {
    if (i > 0) cout << " ";
    cout << C[i].suit << C[i].value;
  }
  cout << endl;
}

bool isStable (struct Card C1[], struct Card C2[], int N) {
  for (int i = 0; i < N; i++) {
    if (C1[i].suit != C2[i].suit) {
      return false;
    }
  }
  return true;
}
  
  
int main() {
  Card C1[MAX], C2[MAX];
  int N;
  
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> C1[i].suit >> C1[i].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:34:3: error: expected primary-expression before 'for'
   34 |   for (int i = 0; i < N; i++) {
      |   ^~~
a.cc:33:37: error: expected ']' before 'for'
   33 | void print(struct Card C[], int N) [
      |                                     ^
      |                                     ]
   34 |   for (int i = 0; i < N; i++) {
      |   ~~~                                
a.cc:34:19: error: 'i' does not name a type
   34 |   for (int i = 0; i < N; i++) {
      |                   ^
a.cc:34:26: error: 'i' does not name a type
   34 |   for (int i = 0; i < N; i++) {
      |                          ^
a.cc:38:3: error: 'cout' does not name a type
   38 |   cout << endl;
      |   ^~~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
a.cc: In function 'int main()':
a.cc:64:3: error: 'print' was not declared in this scope; did you mean 'rint'?
   64 |   print(C1, N);
      |   ^~~~~
      |   rint
Language: C++

#include<iostream>
using namespace std;

struct Card{char suit, value;};

void bubble(struct Card A[], int N){
  for(int i = 0;i < N;i++){
    for (int j = N - 1;j >= i + 1;j--){
      if(A[j].value < A[j-1].value){
        Card t = A[j];A[j] = A[j-1];A[j-1] = t;
      }
    }
  }
}

void selection(struct Card A[], int N){
  for (int i = 0;i < N;i++) {
    int minj = i;
    for(j = i;j < N;j++){
      if(A[j].value < A[minj].value) minj = j;
    }
    Card t = A[j];A[j] = A[j-1];A[j-1] = t;
  }
}

woid print(struct Card A[], int N){
  for (int i = 0;i < N;i++){
    if(i > 0) cout << " ";
    cout << A[i].suit << A[i].value;
  }
  cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int N){
  for(int i = 0;i < N;i++){
    if(C1[i].suit != C2[i].suit) return false;
  }
  return true;
}

int main(){
  Card C1[100], C2[100];
  int N;
  char ch;

  cin >> N;
  for(int i = 0;i < N;i++){
    cin >> C1[i].suit >> C1.value;
  }

  for(int i = 0;i < N;i++) C2[i] = C1[i];

  bubble(C1, N);
  selection(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: In function 'void selection(Card*, int)':
a.cc:19:9: error: 'j' was not declared in this scope
   19 |     for(j = i;j < N;j++){
      |         ^
a.cc:22:16: error: 'j' was not declared in this scope
   22 |     Card t = A[j];A[j] = A[j-1];A[j-1] = t;
      |                ^
a.cc: At global scope:
a.cc:26:1: error: 'woid' does not name a type; did you mean 'void'?
   26 | woid print(struct Card A[], int N){
      | ^~~~
      | void
a.cc: In function 'int main()':
a.cc:48:29: error: request for member 'value' in 'C1', which is of non-class type 'Card [100]'
   48 |     cin >> C1[i].suit >> C1.value;
      |                             ^~~~~
a.cc:56:3: error: 'print' was not declared in this scope; did you mean 'printf'?
   56 |   print(C1, N);
      |   ^~~~~
      |   printf
Language: C++

#include<iostream>
using namespace std;

struct Card{char suit, value;};

void bubble(struct Card A[], int N){
  for(int i = 0;i < N;i++){
    for (int j = N - 1;j >= i + 1;j--){
      if(A[j].value < A[j-1].value){
        Card t = A[j];A[j] = A[j-1];A[j-1] = t;
      }
    }
  }
}

void selection(struct Card A[], int N){
  for (int i = 0;i < N;i++) {
    int minj = i;
    for(j = i;j < N;j++){
      if(A[j].value < A[minj].value) minj = j;
    }
    Card t = A[j];A[j] = A[j-1];A[j-1] = t;
  }
}

void print(struct Card A[], int N){
  for (int i = 0;i < N;i++){
    if(i > 0) cout << " ";
    cout << A[i].suit << A[i].value;
  }
  cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int N){
  for(int i = 0;i < N;i++){
    if(C1[i].suit != C2[i].suit) return false;
  }
  return true;
}

int main(){
  Card C1[100], C2[100];
  int N;
  char ch;

  cin >> N;
  for(int i = 0;i < N;i++){
    cin >> C1[i].suit >> C1.value;
  }

  for(int i = 0;i < N;i++) C2[i] = C1[i];

  bubble(C1, N);
  selection(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: In function 'void selection(Card*, int)':
a.cc:19:9: error: 'j' was not declared in this scope
   19 |     for(j = i;j < N;j++){
      |         ^
a.cc:22:16: error: 'j' was not declared in this scope
   22 |     Card t = A[j];A[j] = A[j-1];A[j-1] = t;
      |                ^
a.cc: In function 'int main()':
a.cc:48:29: error: request for member 'value' in 'C1', which is of non-class type 'Card [100]'
   48 |     cin >> C1[i].suit >> C1.value;
      |                             ^~~~~
Language: C++

#include<iostream>
using namespace std;

struct Card{char suit, value;};

void bubble(struct Card A[], int N){
  for(int i = 0;i < N;i++){
    for (int j = N - 1;j >= i + 1;j--){
      if(A[j].value < A[j-1].value){
        Card t = A[j];A[j] = A[j-1];A[j-1] = t;
      }
    }
  }
}

void selection(struct Card A[], int N){
  for (int i = 0;i < N;i++) {
    int minj = i;
    for(int j = i;j < N;j++){
      if(A[j].value < A[minj].value) minj = j;
    }
    Card t = A[j];A[j] = A[j-1];A[j-1] = t;
  }
}

void print(struct Card A[], int N){
  for (int i = 0;i < N;i++){
    if(i > 0) cout << " ";
    cout << A[i].suit << A[i].value;
  }
  cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int N){
  for(int i = 0;i < N;i++){
    if(C1[i].suit != C2[i].suit) return false;
  }
  return true;
}

int main(){
  Card C1[100], C2[100];
  int N;
  char ch;

  cin >> N;
  for(int i = 0;i < N;i++){
    cin >> C1[i].suit >> C1.value;
  }

  for(int i = 0;i < N;i++) C2[i] = C1[i];

  bubble(C1, N);
  selection(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: In function 'void selection(Card*, int)':
a.cc:22:16: error: 'j' was not declared in this scope
   22 |     Card t = A[j];A[j] = A[j-1];A[j-1] = t;
      |                ^
a.cc: In function 'int main()':
a.cc:48:29: error: request for member 'value' in 'C1', which is of non-class type 'Card [100]'
   48 |     cin >> C1[i].suit >> C1.value;
      |                             ^~~~~
Language: C++

#include<iostream>
using namespace std;
  
struct Card {char suit, vaue;};

void bubble(struct Card A[], int N) {

   for (int i = 0; i < N; i++) {
      for (int j = N-1; j >= i+1; j--) {
         if (A[j].value < A[j-1].value) {
            Card t = A[j]; A[j] = A[j-1]; A[j-1] = t;
         }
      }
   }
}


void selection(struct Card A[], int N) {

   for (int i = 0; i < N; i++) {
      int miji = i;
      for( int j = i; j < N; j++) {
         if (A[j].value < A[miji].value) miji = j;
      }
      Card t = A[i]; A[i] = A[miji]; A[miji] = t;
   }
}


void print(struct Card A[], int N) {

   for (int i = 0; i < N; i++) {
      if (i > 0) cout << " ";
      cout << A[i].suit << A[i].value;
   }
   cout << endl;
}
  

bool isStable(struct Card C1[], struct Card C2[], int N) {

   for (int i = 0; i < N; i++) {
      if (C1[i].suit != C2[i].suit) return false;
   }
   return true;
}


int main() {

   Card C1[100], C2[100];
   int N;
   char ch;

   cin >> N;
   for (int i = 0; i < N; i++) {
      cin >> C1[i].suit >> C1[i].value;
   }

   for (int i = 0; i < N; i++) C2[i] = C1[i];

   bubble(C1, N);
   selection(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: In function 'void bubble(Card*, int)':
a.cc:10:19: error: 'struct Card' has no member named 'value'; did you mean 'vaue'?
   10 |          if (A[j].value < A[j-1].value) {
      |                   ^~~~~
      |                   vaue
a.cc:10:34: error: 'struct Card' has no member named 'value'; did you mean 'vaue'?
   10 |          if (A[j].value < A[j-1].value) {
      |                                  ^~~~~
      |                                  vaue
a.cc: In function 'void selection(Card*, int)':
a.cc:23:19: error: 'struct Card' has no member named 'value'; did you mean 'vaue'?
   23 |          if (A[j].value < A[miji].value) miji = j;
      |                   ^~~~~
      |                   vaue
a.cc:23:35: error: 'struct Card' has no member named 'value'; did you mean 'vaue'?
   23 |          if (A[j].value < A[miji].value) miji = j;
      |                                   ^~~~~
      |                                   vaue
a.cc: In function 'void print(Card*, int)':
a.cc:34:33: error: 'struct Card' has no member named 'value'; did you mean 'vaue'?
   34 |       cout << A[i].suit << A[i].value;
      |                                 ^~~~~
      |                                 vaue
a.cc: In function 'int main()':
a.cc:57:34: error: 'struct Card' has no member named 'value'; did you mean 'vaue'?
   57 |       cin >> C1[i].suit >> C1[i].value;
      |                                  ^~~~~
      |                                  vaue
Language: C++

#include<iostream>

using namespace std;

struct Card {

    char mark;
    int value;

};

void bubbleSort (struct Card C[], int n) {

    int i, j;
    Card v;

    for (i = 0; i < n; i++) {

        for (j = n - 1; j >= i + 1; j++) {

            if (C[j].value < C[j - 1].value) {

                v = C[j];
                C[j] = C[j - 1];
                C[j - 1] = v;

            }

        }

    }

}

void selectionSort (struct Card C[], int v) {

    int i, j, minj;
    Card v;

    for (i = 0; i < n; i++) {

        minj = i;

        for (j = i; j < n; j++) {

            if (C[j].value < C[minj].value) {

                minj = j;

            }

        }

        v = C[i];
        C[i] = C[minj];
        C[minj] = v;

    }

}

void print (struct Card C[], int n) {

    int i;

    for (i = 0; i < n; i++) {

        if (i > 0) {

            cout << " ";

        }

        cout << C[i].mark << C[i].value;

    }

    cout << endl;

}

bool isStable (struct Card C1[], struct Card C2[], int n) {

    int i;

    for (i = 0; i < n; i++) {

        if (C1[i].mark != C2[i].mark) {

            return false;

        }

    }

    return true;

}

int main () {

    Card C1[100], C2[100];
    int i, n;

    cin >> n;

    for (i = 0; i < n; i++) {

        cin >> C1[i].mark >> C2[i].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" << emdl;

    }

    return 0;

}

Compiler output:
a.cc: In function 'void selectionSort(Card*, int)':
a.cc:38:10: error: declaration of 'Card v' shadows a parameter
   38 |     Card v;
      |          ^
a.cc:35:42: note: 'int v' previously declared here
   35 | void selectionSort (struct Card C[], int v) {
      |                                      ~~~~^
a.cc:40:21: error: 'n' was not declared in this scope
   40 |     for (i = 0; i < n; i++) {
      |                     ^
a.cc: In function 'int main()':
a.cc:128:33: error: 'emdl' was not declared in this scope
  128 |         cout << "Not Stable" << emdl;
      |                                 ^~~~
Language: C++

#include <iostream>
using namespace std;

struct Card { char suit, value; };

void bubble(struct Card A[], int n)	{
	for (int i = 0; i < n; i++)	{
		for (int  j = n - 1;  j >= i + 1; j--)	{
			if (A[j].value < A[j-1].value)	{
				Card t = A[j];
				A[j] = A[j-1];
				A[j-1] = t;
			}
		}
	}			
}	

void selection(struct Card A[], int n)		{
	for (int i = 0; i < n; i++)	{
		int minj = i;
		for (int j = i; j < n; j++)	{
			if (A[j].value < A[minj].value)
				minj = j;
		}
		Card t = A[i];
		A[i] = A[minj];
		A[minj] = t;
	}
}

void print(struct Card A[], int n)	{
	for (int i = 0; i < n; i++)	{
		if (i > 0)
			cout << " ";
		cout <<  A[i].suit << A[i].value;
	}
	cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int n)  {
  for (int i = 0; i < n; i++)  {
    if (C1[i].suit != C2[i].suit)
      return false;
    }
  return true;
}

int main(void)  {
	Card C1[100], C2[100];
	int n;
	char ch;
	
	cin >> n;
	for (int i = 0; i < n; i++)  {
		cin >> C1[i].suit >> C1[i].value;
		}
		
		for (int i = 0; i < n; i++)
			C2[i] = C1[i];
			
		bubble(C1, n);
		selection(C2, n);
		
		print(C1, n);
		cout << "Stable" << endl;
		print(C2, n);
		if (isStable(C1, C2, n))  {
			cout << "Stable" << endl;
		} else {
			out << "Not stable" << endl;
	}		
	return 0;
}



				

Compiler output:
a.cc: In function 'int main()':
a.cc:70:25: error: 'out' was not declared in this scope
   70 |                         out << "Not stable" << endl;
      |                         ^~~
Language: C++

#include <iostream>
#include <memory>
using namespace std;

struct _CARD {
    char    suit;
    int     value;
};


void bubble(struct _CARD A[], int N)
{
    for (int i = 0; i < N; i++) {
        for (int j = N - 1; j >= i; j--) {
            if (A[j].value < A[j - 1].value) {
                swap(A[j], A[j - 1]);
            }
        }
    }
}

void selection(struct _CARD A[], int N)
{
    for (int i = 0; i < N; i++) {
        int minj = i;
        for (int j = i; j < N; j++) {
            if (A[j].value < A[minj].value)
                minj = j;
        }
        swap(A[i], A[minj]);
    }
}

void print(struct _CARD A[], int N)
{
    for (int i = 0; i < N; i++) {
        i > 0 ? cout << " " << A[i].suit << A[i].value : cout << A[i].suit << A[i].value;
    }
    cout << endl;
}

bool isStable(struct _CARD c1[], struct _CARD c2[], int N)
{
    for (int i = 0; i < N; i++) {
        if (c1[i].suit != c2[i].suit) {
            return false;
        }
    }
    return true;
}

int main()
{
    _CARD c1[100] = { 0 }, c2[100] = { 0 };
    int N = 0;
    char ch = 0;

    cin >> N;
    for (int i = 0; i < N; i++) {
        cin >> c1[i].suit >> c1[i].value;
    }

    memcpy(c2, c1, sizeof(c2));

    bubble(c1, N);
    selection(c2, N);

    print(c1, N);
    cout << "Stable" << endl;
    print(c2, N);
    isStable(c1, c2, N) ? cout << "Stable" << endl : cout << "Not stable" << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:5: error: 'memcpy' was not declared in this scope
   63 |     memcpy(c2, c1, sizeof(c2));
      |     ^~~~~~
a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <memory>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

struct Card { char suit, value; };

void bubble(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        for ( int j = n - 1; j >= i; j-- ){
            if( A[j].value < A[j - 1].value ){
                Card t = A[j];
                A[j] = A[j - 1];
                A[j - 1] = t;
            }
        }
    }
}

void selection(struct Card A[], int n) {
    for ( int i = 0; i < n; i++){
        int minj = i;
        for ( int j = i; j < n; j++ ) {
            if ( A[j].value < A[minj].value )
                minj = j;
        }
        Card t = A[i];
        A[i] = A[minj];
        A[minj] = t;
    }
}

bool isStable(struct Card C1[], struct Card C2[], int n){
    for ( int i = 0; i < n; i++){
        if ( C1[i].suit != C2[i].suit )
            return false;
    }
    return true;
}

void print(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        if( i > 0 )
            cout << " ";
        cout << A[i].suit << A[i].value;
    }
    cout << endl;
}


int main() {
    
    Card C1[100], C2[100];
    int n;
    char ch;
    
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> C1[i].suit >> C1[i].value;
    }
    
    for (int i = 0; i < n; i++)
        C2[i] = C1[i];
    
    bubble(C1, n)
    selection(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: In function 'int main()':
a.cc:63:18: error: expected ';' before 'selection'
   63 |     bubble(C1, n)
      |                  ^
      |                  ;
   64 |     selection(C2, n);
      |     ~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

struct Card { char suit, value; };

void bubble(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        for ( int j = n - 1; j >= i; j-- ){
            if( A[j].value < A[j - 1].value ){
                Card t = A[j];
                A[j] = A[j - 1];
                A[j - 1] = t;
            }
        }
    }
}

void selection(struct Card A[], int n) {
    for ( int i = 0; i < n; i++){
        int minj = i;
        for ( int j = i; j < n; j++ ) {
            if ( A[j].value < A[minj].value )
                minj = j;
        }
        Card t = A[i];
        A[i] = A[minj];
        A[minj] = t;
    }
}

bool isStable(struct Card C1[], struct Card C2[], int n){
    for ( int i = 0; i < n; i++){
        if ( C1[i].suit != C2[i].suit )
            return false;
    }
    return true;
}

void print(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        if( i > 0 )
            cout << " ";
        cout << A[i].suit << A[i].value;
    }
    cout << endl;
}


int main() {
    
    Card C1[100], C2[100];
    int n;
    char ch;
    
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> C1[i].suit >> C1[i].value;
    }
    
    for (int i = 0; i < n; i++)
        C2[i] = C1[i];
    
    bubble(C1, n)
    selection(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: In function 'int main()':
a.cc:63:18: error: expected ';' before 'selection'
   63 |     bubble(C1, n)
      |                  ^
      |                  ;
   64 |     selection(C2, n);
      |     ~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

struct Card { char suit, value; };

void bubble(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        for ( int j = n - 1; j >= i; j-- ){
            if( A[j].value < A[j - 1].value ){
                Card t = A[j];
                A[j] = A[j - 1];
                A[j - 1] = t;
            }
        }
    }
}

void selection(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        int minj = i;
        for ( int j = i; j < n; j++ ) {
            if ( A[j].value < A[minj].value )
                minj = j;
        }
        Card t = A[i];
        A[i] = A[minj];
        A[minj] = t;
    }
}

bool isStable(struct Card C1[], struct Card C2[], int n){
    for ( int i = 0; i < n; i++){
        if ( C1[i].suit != C2[i].suit )
            return false;
    }
    return true;
}

void print(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        if( i > 0 )
            cout << " ";
        cout << A[i].suit << A[i].value;
    }
    cout << endl;
}


int main() {
    
    Card C1[100], C2[100];
    int n;
    char ch;
    
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> C1[i].suit >> C1[i].value;
    }
    
    for (int i = 0; i < n; i++)
        C2[i] = C1[i];
    
    bubble(C1, n)
    selection(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: In function 'int main()':
a.cc:63:18: error: expected ';' before 'selection'
   63 |     bubble(C1, n)
      |                  ^
      |                  ;
   64 |     selection(C2, n);
      |     ~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

struct Card { char suit, value; };

void bubble(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        for ( int j = n - 1; j >= i; j-- ){
            if( A[j].value < A[j - 1].value ){
                Card t = A[j];
                A[j] = A[j - 1];
                A[j - 1] = t;
            }
        }
    }
}

void selection(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        int minj = i;
        for ( int j = i; j < n; j++ ) {
            if ( A[j].value < A[minj].value )
                minj = j;
        }
        Card t = A[i];
        A[i] = A[minj];
        A[minj] = t;
    }
}



void print(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        if( i > 0 )
            cout << " ";
        cout << A[i].suit << A[i].value;
    }
    cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int n){
    for ( int i = 0; i < n; i++){
        if ( C1[i].suit != C2[i].suit )
            return false;
    }
    return true;
}

int main() {
    
    Card C1[100], C2[100];
    int n;
    char ch;
    
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> C1[i].suit >> C1[i].value;
    }
    
    for (int i = 0; i < n; i++)
        C2[i] = C1[i];
    
    bubble(C1, n)
    selection(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: In function 'int main()':
a.cc:64:18: error: expected ';' before 'selection'
   64 |     bubble(C1, n)
      |                  ^
      |                  ;
   65 |     selection(C2, n);
      |     ~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

struct Card { char suit, value; };

void bubble(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        for ( int j = n - 1; j >= i; j-- ){
            if( A[j].value < A[j - 1].value ){
                Card t = A[j];
                A[j] = A[j - 1];
                A[j - 1] = t;
            }
        }
    }
}

void selection(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        int minj = i;
        for ( int j = i; j < n; j++ ) {
            if ( A[j].value < A[minj].value )
                minj = j;
        }
        Card t = A[i];
        A[i] = A[minj];
        A[minj] = t;
    }
}

void print(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        if( i > 0 )
            cout << " ";
        cout << A[i].suit << A[i].value;
    }
    cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int n){
    for ( int i = 0; i < n; i++ ){
        if ( C1[i].suit != C2[i].suit ) return false;
    }
    return true;
}

int main() {
    
    Card C1[100], C2[100];
    int n;
    char ch;
    
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> C1[i].suit >> C1[i].value;
    }
    
    for (int i = 0; i < n; i++)
        C2[i] = C1[i];
    
    bubble(C1, n)
    selection(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: In function 'int main()':
a.cc:61:18: error: expected ';' before 'selection'
   61 |     bubble(C1, n)
      |                  ^
      |                  ;
   62 |     selection(C2, n);
      |     ~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

struct Card { char suit, value; };

void bubble(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        for ( int j = n - 1; j >= i + 1; j-- ){
            if( A[j].value < A[j - 1].value ){
                Card t = A[j];
                A[j] = A[j - 1];
                A[j - 1] = t;
            }
        }
    }
}

void selection(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        int minj = i;
        for ( int j = i; j < n; j++ ) {
            if ( A[j].value < A[minj].value )
                minj = j;
        }
        Card t = A[i];
        A[i] = A[minj];
        A[minj] = t;
    }
}

void print(struct Card A[], int n) {
    for ( int i = 0; i < n; i++ ){
        if( i > 0 )
            cout << " ";
        cout << A[i].suit << A[i].value;
    }
    cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int n){
    for ( int i = 0; i < n; i++ ){
        if ( C1[i].suit != C2[i].suit ) return false;
    }
    return true;
}

int main() {
    
    Card C1[100], C2[100];
    int n;
    char ch;
    
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> C1[i].suit >> C1[i].value;
    }
    
    for (int i = 0; i < n; i++)
        C2[i] = C1[i];
    
    bubble(C1, n)
    selection(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: In function 'int main()':
a.cc:61:18: error: expected ';' before 'selection'
   61 |     bubble(C1, n)
      |                  ^
      |                  ;
   62 |     selection(C2, n);
      |     ~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

struct Card { char suit, value; };

void bubble(struct Card A[], int N) {
    for ( int i = 0; i < N; i++ ){
        for ( int j = N - 1; j >= i + 1; j-- ){
            if( A[j].value < A[j - 1].value ){
                Card t = A[j];
                A[j] = A[j - 1];
                A[j - 1] = t;
            }
        }
    }
}

void selection(struct Card A[], int N) {
    for ( int i = 0; i < N; i++ ){
        int minj = i;
        for ( int j = i; j < N; j++ ) {
            if ( A[j].value < A[minj].value )
                minj = j;
        }
        Card t = A[i];
        A[i] = A[minj];
        A[minj] = t;
    }
}

void print(struct Card A[], int N) {
    for ( int i = 0; i < N; i++ ){
        if( i > 0 )
            cout << " ";
        cout << A[i].suit << A[i].value;
    }
    cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int N){
    for ( int i = 0; i < N; i++ ){
        if ( C1[i].suit != C2[i].suit ) return false;
    }
    return true;
}

int main() {
    
    Card C1[100], C2[100];
    int N;
    char ch;
    
    cin >> N;
    for (int i = 0; i < N; i++){
        cin >> C1[i].suit >> C1[i].value;
    }
    
    for (int i = 0; i < N; i++)
        C2[i] = C1[i];
    
    bubble(C1, N)
    selection(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: In function 'int main()':
a.cc:61:18: error: expected ';' before 'selection'
   61 |     bubble(C1, N)
      |                  ^
      |                  ;
   62 |     selection(C2, N);
      |     ~~~~~~~~~
Language: C++

#include <iostream>
#include <string.h>
using namespace std;

int main()
{
	int n = 0 , minj = 0, flag = 1, k = 0;
	char a[36][3], b[36][3], temp[3];

	cin >> n;

	for (int i = 0; i < n; i++)
		cin >> a[i];

	for (int i = 0; i < n; i++)
		strcpy_s(b[i], a[i]);

	while (flag) {
		flag = 0;
		for (int j = n - 1; j > 0; j--) {
			if (b[j][1] < b[j - 1][1]) {
				strcpy_s(temp, b[j - 1]);
				strcpy_s(b[j - 1], b[j]);
				strcpy_s(b[j], temp);
				flag = 1;
			}
		}
	}

	for (int i = 0; i < n - 1; i++)
		cout << b[i] << " ";
	cout << b[n - 1] << endl;

	for (int i = 0; i < n - 1; i++) {
		if (b[i][1] == b[i + 1][1]) {

			int s = 0, t = 0;

			while (strcmp(a[s], b[i]))
				s++;

			while (strcmp(a[t], b[i + 1]))
				t++;

			if (s < t)
				k = 1;
		}
	}

	if (k == 1)
		cout << "Stable" << endl;
	else
		cout << "Not stable" << endl;

	for (int i = 0; i < n; i++)
		strcpy_s(b[i], a[i]);

	for (int i = 0; i < n - 1; i++){

		minj = i;

		for (int j = i + 1; j < n; j++) {
			if (b[j][1] < b[minj][1])
				minj = j;
		}

		if (minj > i) {
			strcpy_s(temp, b[i]);
			strcpy_s(b[i], b[minj]);
			strcpy_s(b[minj], temp);
		}
	}

	for (int i = 0; i < n - 1; i++)
		cout << b[i] << " ";
	cout << b[n - 1] << endl;

	k = 0;

	for (int i = 0; i < n - 1; i++) {
		if (b[i][1] == b[i + 1][1]) {

			int s = 0, t = 0;

			while (strcmp(a[s], b[i]))
				s++;

			while (strcmp(a[t], b[i + 1]))
				t++;

			if (s < t)
				k = 1;
		}
	}

	if (k == 1)
		cout << "Stable" << endl;
	else
		cout << "Not stable" << endl;
		
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   16 |                 strcpy_s(b[i], a[i]);
      |                 ^~~~~~~~
      |                 strcpy
a.cc:22:33: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   22 |                                 strcpy_s(temp, b[j - 1]);
      |                                 ^~~~~~~~
      |                                 strcpy
a.cc:56:17: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   56 |                 strcpy_s(b[i], a[i]);
      |                 ^~~~~~~~
      |                 strcpy
a.cc:68:25: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   68 |                         strcpy_s(temp, b[i]);
      |                         ^~~~~~~~
      |                         strcpy