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

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}

int isStable(int a[],int b[],int N){
  int i;
  for(i=0;i<N;i++){
    if(a[i]!=b[i]){
      return false;
    }
  return true;
}

int main(void)
{
  int i,N,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
    scanf("%d",&b[i]);
    b[i]=a[i]
  }
  bubble(a,N);
  select(b,N);

  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");

  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  if(isStable(a[],b[],N)){
    printf("Stable\n");
  }
  else{
    printf("Not stable\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'isStable':
main.c:37:14: error: 'false' undeclared (first use in this function)
   37 |       return false;
      |              ^~~~~
main.c:2:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:37:14: note: each undeclared identifier is reported only once for each function it appears in
   37 |       return false;
      |              ^~~~~
main.c:39:10: error: 'true' undeclared (first use in this function)
   39 |   return true;
      |          ^~~~
main.c:39:10: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'main':
main.c:50:14: error: expected ';' before '}' token
   50 |     b[i]=a[i]
      |              ^
      |              ;
   51 |   }
      |   ~           
main.c:71:17: error: expected expression before ']' token
   71 |   if(isStable(a[],b[],N)){
      |                 ^
main.c: In function 'isStable':
main.c:78:1: error: expected declaration or statement at end of input
   78 | }
      | ^
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}

int isStable(int a[],int b[],int N){
  int i;
  for(i=0;i<N;i++){
    if(a[i]!=b[i]){
      return false;
    }
  return true;
}

int main(void)
{
  int i,N,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
    scanf("%d",&b[i]);
    b[i]=a[i]
  }
  bubble(a,N);
  select(b,N);

  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");

  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  if(isStable(a,b,N)){
    printf("Stable\n");
  }
  else{
    printf("Not stable\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'isStable':
main.c:37:14: error: 'false' undeclared (first use in this function)
   37 |       return false;
      |              ^~~~~
main.c:2:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:37:14: note: each undeclared identifier is reported only once for each function it appears in
   37 |       return false;
      |              ^~~~~
main.c:39:10: error: 'true' undeclared (first use in this function)
   39 |   return true;
      |          ^~~~
main.c:39:10: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'main':
main.c:50:14: error: expected ';' before '}' token
   50 |     b[i]=a[i]
      |              ^
      |              ;
   51 |   }
      |   ~           
main.c: In function 'isStable':
main.c:78:1: error: expected declaration or statement at end of input
   78 | }
      | ^
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}

int isStable(int a[],int b[],int N){
  int i;
  for(i=0;i<N;i++){
    if(a[i]!=b[i]){
      return false;
    }
  }
  return true;
}

int main(void)
{
  int i,N,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
    scanf("%d",&b[i]);
    b[i]=a[i]
  }
  bubble(a,N);
  select(b,N);

  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");

  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  if(isStable(a,b,N)){
    printf("Stable\n");
  }
  else{
    printf("Not stable\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'isStable':
main.c:37:14: error: 'false' undeclared (first use in this function)
   37 |       return false;
      |              ^~~~~
main.c:2:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:37:14: note: each undeclared identifier is reported only once for each function it appears in
   37 |       return false;
      |              ^~~~~
main.c:40:10: error: 'true' undeclared (first use in this function)
   40 |   return true;
      |          ^~~~
main.c:40:10: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'main':
main.c:51:14: error: expected ';' before '}' token
   51 |     b[i]=a[i]
      |              ^
      |              ;
   52 |   }
      |   ~
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}

int isStable(int a[],int b[],int N){
  int i;
  for(i=0;i<N;i++){
    if(a[i]!=b[i]){
      return false;
    }
  }
  return true;
}

int main(void)
{
  int i,N,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
    scanf("%d",&b[i]);
    b[i]=a[i];
  }
  bubble(a,N);
  select(b,N);

  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");

  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  if(isStable(a,b,N)){
    printf("Stable\n");
  }
  else{
    printf("Not stable\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'isStable':
main.c:37:14: error: 'false' undeclared (first use in this function)
   37 |       return false;
      |              ^~~~~
main.c:2:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:37:14: note: each undeclared identifier is reported only once for each function it appears in
   37 |       return false;
      |              ^~~~~
main.c:40:10: error: 'true' undeclared (first use in this function)
   40 |   return true;
      |          ^~~~
main.c:40:10: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}

int main(void)
{
  int i,N,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
    scanf("%d",&b[i]);
    b[i]=a[i];
  }
  bubble(a,N);
  select(b,N);

  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");

  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  for(i=0;i<N;i++){
    if(a[i]==b[i])){
      printf("Stable\n");
    }
    else{
      printf("Not stable\n");
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:63:19: error: expected statement before ')' token
   63 |     if(a[i]==b[i])){
      |                   ^
main.c:66:5: error: 'else' without a previous 'if'
   66 |     else{
      |     ^~~~
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}

int isStable(int a[],int b[])
  int i,j,x,y;
              
int main(void)
{
  int i,x,y,N,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<N;i++){
    scanf("%d",&b[i]);
    b[i]=a[i];
  }
  bubble(a,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");
  printf("Stable\n");

  select(b,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  for(i=0;i<N-1;i++){
      for(j=i+1;j<N-1;j++){
        for(x=0;x<N-1;x++){
          for(y=x+1;y<N-1;y++){
            if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b{x}){
              printf("Stable\n");
            }
            else{
              printf("Not stable\n");
            }
          }
        }
      }
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'isStable':
main.c:37:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   37 | {
      | ^
main.c:82:3: error: expected declaration specifiers before 'return'
   82 |   return 0;
      |   ^~~~~~
main.c:83:1: error: expected declaration specifiers before '}' token
   83 | }
      | ^
main.c:33:5: error: old-style parameter declarations in prototyped function definition
   33 | int isStable(int a[],int b[])
      |     ^~~~~~~~
main.c:84: error: expected '{' at end of input
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}
              
int main(void)
{
  int i,x,y,N,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<N;i++){
    scanf("%d",&b[i]);
    b[i]=a[i];
  }
  bubble(a,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");
  printf("Stable\n");

  select(b,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  for(i=0;i<N-1;i++){
      for(j=i+1;j<N-1;j++){
        for(x=0;x<N-1;x++){
          for(y=x+1;y<N-1;y++){
            if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b{x}){
              printf("Stable\n");
            }
            else{
              printf("Not stable\n");
            }
          }
        }
      }
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:65:11: error: 'j' undeclared (first use in this function)
   65 |       for(j=i+1;j<N-1;j++){
      |           ^
main.c:65:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:68:47: error: expected ')' before '{' token
   68 |             if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b{x}){
      |               ~                               ^
      |                                               )
main.c: At top level:
main.c:79:3: error: expected identifier or '(' before 'return'
   79 |   return 0;
      |   ^~~~~~
main.c:80:1: error: expected identifier or '(' before '}' token
   80 | }
      | ^
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}
              
int main(void)
{
  int i,j,x,y,N,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<N;i++){
    scanf("%d",&b[i]);
    b[i]=a[i];
  }
  bubble(a,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");
  printf("Stable\n");

  select(b,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  for(i=0;i<N-1;i++){
      for(j=i+1;j<N-1;j++){
        for(x=0;x<N-1;x++){
          for(y=x+1;y<N-1;y++){
            if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b{x}){
              printf("Stable\n");
            }
            else{
              printf("Not stable\n");
            }
          }
        }
      }
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:68:44: warning: comparison between pointer and integer
   68 |             if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b{x}){
      |                                            ^~
main.c:68:47: error: expected ')' before '{' token
   68 |             if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b{x}){
      |               ~                               ^
      |                                               )
main.c: At top level:
main.c:79:3: error: expected identifier or '(' before 'return'
   79 |   return 0;
      |   ^~~~~~
main.c:80:1: error: expected identifier or '(' before '}' token
   80 | }
      | ^
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}
              
int main(void)
{
  int i,j,x,y,N,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<N;i++){
    scanf("%d",&b[i]);
    b[i]=a[i];
  }
  bubble(a,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");
  printf("Stable\n");

  select(b,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  for(i=0;i<N-1;i++){
      for(j=i+1;j<N-1;j++){
        for(x=0;x<N-1;x++){
          for(y=x+1;y<N-1;y++){
            if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b{x}){
              printf("Stable\n");
            }
            else{
              printf("Not stable\n");
            }
        }
      }
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:68:44: warning: comparison between pointer and integer
   68 |             if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b{x}){
      |                                            ^~
main.c:68:47: error: expected ')' before '{' token
   68 |             if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b{x}){
      |               ~                               ^
      |                                               )
Language: C

#include<stdio.h>
#include<stdlib.h>
 
void Bubble(int a[36],char b[36],int n)
{
  int i,tempa,flag;
  char tempb;
  flag = 1;
  while(flag == 1) {
  flag = 0;
  for (i =n-2; i >=0;i--) {
    if(a[i]>a[i+1]){
      tempa = a[i+1];
      tempb = b[i+1];
      a[i+1] = a[i];
      b[i+1] = b[i];
      a[i] = tempa;
      b[i] = tempb;
      flag = 1;
    
    }
  }
  }
  for(i = 0; i<n-1;i++)
    printf("%c%d ",b[i],a[i]);
  printf("%c%d\n",b[n-1],a[n-1]);
  printf("Stable\n");
}
 

void Selection(int a[36],char b[36],int n)
{
  int i,mini,tempa,j;
  char tempb;
  for (i = 0; i < n; i++) {
    mini = i;
    for (j = i; j < n; j++) {
      if(a[mini] > a[j])
        mini = j;
    }
    if(mini != i){
      tempa = a[i];
      tempb = b[i];
      a[i] = a[mini];
      b[i] = b[mini];
      a[mini] = tempa;
      b[mini] = tempb;
    }  
   }
  for (i = 0; i < n-1; i++)
  printf("%c%d ",b[i],a[i]);
  printf("%c%d\n",b[n-1],a[n-1]);
}

void Stable(char b1[36],char b2[36],int n){
  int i,flag = 0;
  for(i = 0;i < n ;i++){
    if(b1[i]!=b2[i]) {
      printf("Not stable\n");
      flag = 1;
      break;
    }
  }
  if(flag == 0)
    printf("Stable\n");  
}

int main ()
{
 int i,a1[36],a2[36],n,num=0;
 char b1[36],b2[36],input[72];
 scanf("%d",&n);
 for (i = 0; i < 2n; i+=2) {
  scanf("%c%c",&input[i],&input[i+1]);
  a1[num]=atoi(input[i+1]);
  b2[num]=input[i];
}
 for (i = 0; i < n; i++) {
  a2[i]=a1[i];
  b2[i]=b1[i];
 }
 Bubble(a1,b1,n);
 Selection(a2,b2,n);
 Stable(b1,b2,n);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:73:18: error: invalid suffix "n" on integer constant
   73 |  for (i = 0; i < 2n; i+=2) {
      |                  ^~
main.c:75:21: error: passing argument 1 of 'atoi' makes pointer from integer without a cast [-Wint-conversion]
   75 |   a1[num]=atoi(input[i+1]);
      |                ~~~~~^~~~~
      |                     |
      |                     char
In file included from main.c:2:
/usr/include/stdlib.h:105:30: note: expected 'const char *' but argument is of type 'char'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}
              
int main(void)
{
  int i,j,x,y,N,flag,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<N;i++){
    scanf("%d",&b[i]);
    b[i]=a[i];
  }
  bubble(a,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");
  printf("Stable\n");

  select(b,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  flag=1;
  for(i=0;flag;i++){
      flag=0;
      for(j=i+1;j<N-1;j++){
        for(x=0;x<N-1;x++){
          for(y=x+1;y<N-1;y++){
            if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b[x]){
              printf("Stable\n");
              flag=1;
            }
        }
      }
    }
  printf("Not stable")
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:77:23: error: expected ';' before '}' token
   77 |   printf("Not stable")
      |                       ^
      |                       ;
   78 |   }
      |   ~
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}
              
int main(void)
{
  int i,j,x,y,N,flag,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<N;i++){
    scanf("%d",&b[i]);
    b[i]=a[i];
  }
  bubble(a,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");
  printf("Stable\n");

  select(b,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  flag=1;
  for(i=0;flag;i++){
      flag=0;
      for(j=i+1;j<N-1;j++){
        for(x=0;x<N-1;x++){
          for(y=x+1;y<N-1;y++){
            if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b[x]){
              printf("Stable\n");
              flag=1;
            }
          }
        }
      }
    }
  printf("Not stable")
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:78:23: error: expected ';' before '}' token
   78 |   printf("Not stable")
      |                       ^
      |                       ;
   79 |   }
      |   ~                    
main.c: At top level:
main.c:80:3: error: expected identifier or '(' before 'return'
   80 |   return 0;
      |   ^~~~~~
main.c:81:1: error: expected identifier or '(' before '}' token
   81 | }
      | ^
Language: C

#include <stdio.h>

int bubble(int a[],int N){
  int i,j,z;
  z=0;
  for(i=0;i<N;i++){
    for(j=N-1;j>=i+1;j--){
      if(a[j]<a[j-1]){
        z=a[j-1];
        a[j-1]=a[j];
        a[j]=z;
      }
    }
  }
}

int select(int b[],int N){
  int i,j,s,z,minj;
  z=0;
  for(i=0;i<N-1;i++){
    minj=i;
    for(j=i;j<N;j++){
      if(b[j]<b[minj]){
        minj=j;
      }
    }
    z=b[i];
    b[i]=b[minj];
    b[minj]=z;
  }
}
              
int main(void)
{
  int i,j,x,y,N,flag,a[100],b[100];
  scanf("%d",&N);

  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<N;i++){
    scanf("%d",&b[i]);
    b[i]=a[i];
  }
  bubble(a,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",a[i]);
  }
  printf("%d\n");
  printf("Stable\n");

  select(b,N);
  for(i=0;i<N;i++){
    if(i>0){
      printf(" ");
    }
    printf("%d",b[i]);
  }
  printf("%d\n");
  
  flag=1;
  for(i=0;flag;i++){
      flag=0;
      for(j=i+1;j<N-1;j++){
        for(x=0;x<N-1;x++){
          for(y=x+1;y<N-1;y++){
            if(a[i]==a[j]&&a[i]==b[y]&&b[j]==b[x]){
              printf("Stable\n");
              flag=1;
            }
          }
        }
      }
  printf("Not stable")
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:77:23: error: expected ';' before '}' token
   77 |   printf("Not stable")
      |                       ^
      |                       ;
   78 |   }
      |   ~
Language: C

#include "stdio.h"

typedef struct card{
    char c;
    int n;
}card;

int main()
{
    struct card a[36], b[36],x;
    int n, j, x, c, i, mini,d;
    scanf("%d", &n);
    
    for (i = 0; i <= n - 1; i++)
        scanf("%c%d", &a[i].c,&a[i].n);

    
    for (i = 0; i <= n - 1; i++) {
        b[i].c = a[i].c;
        b[i].n = a[i].n;
    }
    /*bublle*/
    for (i = 0; i <= n - 1; i++) {
        for(j=n-1;j>i;j--) 
            if (a[j].n < a[j - 1].n){
            x = a[j];
            a[j] = a[j - 1];
            a[j - 1] = x;
            }
    }
    /*selectsort*/

    for (i = 0; i <= n - 1; i++) {
        mini = i;
        for (j = i; j <= n - 1; j++) {
            if (b[j].n < b[mini].n) {
                mini = j;
        }
            x = b[i];
            b[i] = b[mini];
            b[mini] = x;
        }
    }
      
    j = 0;
    for (j = 0; j < n - 1; j++)
        printf("%c%d ", a[j].c, a[j].n);

    printf("%c%d\n", a[n - 1].c, a[n - 1].n);
    printf("Stable\n");
    
    j = 0;
    for (j = 0; j < n - 1; j++)
    printf("%c%d ", b[j].c,b[j].n);

    printf("%c%d\n", b[n - 1].c, b[n - 1].n);

    j = 0;
    for (j = 0; j < n ; j++) {
        if (a[j].c != b[j].c) {
            printf("Not stable\n");
            break;
        }
    }
    if(i==n)
        printf("Stable\n");

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: conflicting types for 'x'; have 'int'
   11 |     int n, j, x, c, i, mini,d;
      |               ^
main.c:10:30: note: previous declaration of 'x' with type 'struct card'
   10 |     struct card a[36], b[36],x;
      |                              ^
Language: C

#include "stdafx.h"

struct card{
    char c;
    int n;
};

int main()
{
    struct card a[36], b[36],x[36];
    int n, j=0, i=0, mini;
    scanf("%d", &n);
    
    for (i = 0; i <= n - 1; i++){
        scanf(" %c%d", &a[i].c,&a[i].n);
        b[i].c = a[i].c;
        b[i].n = a[i].n;
       

    }
    /*bublle*/
    for (i = 0; i < n ; i++) {
        for (j = n - 1; j > i; j--) {
            if (a[j].n < a[j - 1].n) {
                x[j] = a[j];
                a[j] = a[j - 1];
                a[j - 1] = x[j];
            }
        }
    }
    /*selectsort*/

    for (i = 0; i < n ; i++) {
        mini = i;
        for (j = i; j < n; j++) {
            if (b[j].n < b[mini].n)
                mini = j;
        }
            x[i] = b[i];
            b[i] = b[mini];
            b[mini] = x[i];
        }
    
      
    j = 0;
    for (j = 0; j < n - 1; j++)
        printf("%c%d ", a[j].c, a[j].n);

Compiler output:
main.c:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include "stdio.h"

struct card{
    char c;
    int n;
};

int main()
{
    struct card a[36], b[36],x[36];
    int n, j=0, i=0, mini;
    scanf("%d", &n);
    
    for (i = 0; i <= n - 1; i++){
        scanf(" %c%d", &a[i].c,&a[i].n);
        b[i].c = a[i].c;
        b[i].n = a[i].n;
       

    }
    /*bublle*/
    for (i = 0; i < n ; i++) {
        for (j = n - 1; j > i; j--) {
            if (a[j].n < a[j - 1].n) {
                x[j] = a[j];
                a[j] = a[j - 1];
                a[j - 1] = x[j];
            }
        }
    }
    /*selectsort*/

    for (i = 0; i < n ; i++) {
        mini = i;
        for (j = i; j < n; j++) {
            if (b[j].n < b[mini].n)
                mini = j;
        }
            x[i] = b[i];
            b[i] = b[mini];
            b[mini] = x[i];
        }
    
      
    j = 0;
    for (j = 0; j < n - 1; j++)
        printf("%c%d ", a[j].c, a[j].n);

Compiler output:
main.c: In function 'main':
main.c:47:9: error: expected declaration or statement at end of input
   47 |         printf("%c%d ", a[j].c, a[j].n);
      |         ^~~~~~
Language: C

#include<stdio.h>

typedef struct {
  char mark[5];
  int  num;
}card;

int bubble(int kosuu, card trump[])
{
 int i, j, box1 ;
 char box2; 
  
 
 for(i = 1;i <= kosuu;i++) {
   for(j = kosuu;j > i;j--) {
     if (trump[j].num < trump[j-1].num) {
       box1  = trump[j-1].num;
       box2  = trump[j-1].mark[0];      
       trump[j-1].num     = trump[j].num;
       trump[j-1].mark[0] = trump[j].mark[0];
       trump[j].num     = box1;
       trump[j].mark[0] = box2;
     }
   }
 }
 
 for(i = 1;i < kosuu;i++){
   printf("%c%d ", trump[i].mark[0], trump[i].num);
 }
 printf("%c%d\n", trump[i].mark[0], trump[i].num);
 printf("Stable\n");
 return 0;
}

int select(int kosuu, card trump[])
{
 int i, j,  min, minnum, box1,flag=0;
 char box2;
   
 for(i = 1;i <= kosuu;i++){
   min = trump[i].num;
   for(j = i + 1;j <= kosuu;j++){
     if(trump[j].num < min){
       min = trump[j].num;
       minnum = j;
     }
   }
   if(min < trump[i].num){
      box1  = trump[i].num;
      box2  = trump[i].mark[0];
      trump[i].num     = min;
      trump[i].mark[0] = trump[minnum].mark[0];
      trump[minnum].num     = box1;
      trump[minnum].mark[0] = box2;
   }
 }
 
 for(i = 1;i < kosuu;i++){
   printf("%c%d ", trump[i].mark[0], trump[i].num);
 }
 printf("%c%d\n", trump[i].mark[0], trump[i].num);
 for(i=1;i<kosuu;i++){
   for(j=i;j<=kosuu;j++){
     if(trump[j].num==trump[i].num)
       flag=1;
   }
 }
 if(flag==0) 
   printf("Stable\n");
 else
   printf("Not stable\n");
 return 0;
}

int main()
{
 int i, kosuu;
 card trump[40],copy1[40];
   
 scanf("%d", &kosuu);
   
 for(i = 1;i <=kosuu; i++){ 
   scanf("%1s%d",&trump[i].mark,&trump[i].num);
 }
 
 for(i = 1;i <=kosuu; i++){
   copy1[i].mark[0]=trump[i].mark[0];
   copy1[i].num =trump[i].num;
 }
 bubble(kosuu,trump);
 select(kosuu,copy1);
 
 return 0;

Compiler output:
main.c: In function 'main':
main.c:93:2: error: expected declaration or statement at end of input
   93 |  return 0;
      |  ^~~~~~
Language: C

#include<stdio.h>

struct Card {
	char suit;
	char value;
};

int main() {

	struct Card C1[101], C2[101], C3;
	int n, i, j, mini, hantei = 0;
	char ch;

	scanf("%d%c", &n, &ch);

	for (i = 0; i < n; i++) {
		scanf("%c%c%c", &C1[i].suit, &C1[i].value, &ch);
	}


	for (i = 0; i < n??; i++) {
		C2[i] = C1[i];
	}


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

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

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

				C3 = C1[j];
				C1[j] = C1[j - 1];
				C1[j - 1] = C3;

			}
		}
	}


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

			if (C2[j].value < C2[mini].value) {

				mini = j;

			}
		}
		if (mini != i) {

			C3 = C2[i];
			C2[i] = C2[mini];
			C2[mini] = C3;

		}
	}

	for (i = 0; i < n??; i++) {
		if (i) printf(" ");
		printf("%c%c", C1[i].suit, C1[i].value);
	}
	printf("\n");
	printf("Stable\n");

	for (i = 0; i < n??; i++) {
		if (i) printf(" ");
		printf("%c%c", C2[i].suit, C2[i].value);
		if (C1[i].suit == C2[i].suit) hantei++;
	}
	if (hantei == n) printf("\nStable\n");
	else printf("\nNot stable\n");


	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:27: error: expected expression before '?' token
   21 |         for (i = 0; i < n??; i++) {
      |                           ^
main.c:60:27: error: expected expression before '?' token
   60 |         for (i = 0; i < n??; i++) {
      |                           ^
main.c:67:27: error: expected expression before '?' token
   67 |         for (i = 0; i < n??; i++) {
      |                           ^
Language: C

#include<stdio.h>

struct card{
  char design;
  int num;
};

void bubble(card a[], int N){
  int i, j, temp;
  int flag = 1;
  char t;
  for (i=0; flag==1; i++) {
    flag = 0;
    for (j=N-1; j>=i+1; j--) {
      if (a[j-1].num > a[j].num) {
        temp       = a[j-1].num;  t             = a[j-1].design;
        a[j-1].num = a[j].num;    a[j-1].design = a[j].design;
        a[j].num   = temp;        a[j].design   = t;
        flag = 1;
      }
    }
  }
}
void selection(card a[], int N){
  int i, j, temp, minj;
  char t;
  for (i=0; i<N-1; i++) {
    minj = i;
    for (j=i; j<N; j++) {
      if (a[j].num < a[minj].num)
        minj = j;
    }
    temp       = a[j-1].num;  t             = a[j-1].design;
    a[j-1].num = a[j].num;    a[j-1].design = a[j].design;
    a[j].num   = temp;        a[j].design   = t;

  }
}
void print(card a[], int N){
  int i;
  for (i=0; i<N-1; i++) {
    if (i>0)
      putchar(' ');
    printf("%c%d", a[i].design, a[i].num);
  }
  printf("\n");
}
int stable(card c1[], card c2[], int N){
  int i;
  for (i=0; i<N-1; i++) {
    if (c1[i].design != c2[i].design)
      return 0;
  }
  return 1;
}

int main(){
  struct card c1[100], c2[100];
  int N, i;

  scanf("%d", &N);
  for (i=0; i<N-1; i++)
    scanf("%c%d", c1[i].design, c2[i].num);

  for (i=0; i<N-1; 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:8:13: error: unknown type name 'card'
    8 | void bubble(card a[], int N){
      |             ^~~~
main.c:24:16: error: unknown type name 'card'
   24 | void selection(card a[], int N){
      |                ^~~~
main.c:39:12: error: unknown type name 'card'
   39 | void print(card a[], int N){
      |            ^~~~
main.c:48:12: error: unknown type name 'card'
   48 | int stable(card c1[], card c2[], int N){
      |            ^~~~
main.c:48:23: error: unknown type name 'card'
   48 | int stable(card c1[], card c2[], int N){
      |                       ^~~~
main.c: In function 'main':
main.c:68:3: error: implicit declaration of function 'bubble' [-Wimplicit-function-declaration]
   68 |   bubble(c1, N);
      |   ^~~~~~
main.c:69:3: error: implicit declaration of function 'selection' [-Wimplicit-function-declaration]
   69 |   selection(c2, N);
      |   ^~~~~~~~~
main.c:71:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   71 |   print(c1, N);
      |   ^~~~~
      |   printf
main.c:74:7: error: implicit declaration of function 'stable' [-Wimplicit-function-declaration]
   74 |   if (stable(c1, c2, N)==1) {
      |       ^~~~~~
Language: C

#include <stdio.h>

struct Card {
   char suit;
   char value;
};

int main(void)
{
   struct Card C1[100], C2[100];
   int N, i, j, minj;
   int k = 0;
   char ch;

   scanf("%d%c", &N, &ch);
      

Compiler output:
main.c: In function 'main':
main.c:15:4: error: expected declaration or statement at end of input
   15 |    scanf("%d%c", &N, &ch);
      |    ^~~~~
Language: C

#include<stdio.h>

struct Card{
   char suit;
   char value;
};

int main () {

   struct Card C1[36], C2[36], C3;
   int n, i, j, mini, hantei = 0;
   char ch;

   scanf("%d%c",&n, &ch);

   for(i = 0; i < n; i++){
      scanf("%c%c%c", &C1[i].suit, &C1[i].value, &ch);
   }


   for(i = 0; i < n; i++){
      C2[i] = C1[i];
   }



   for(i = 0; i <= n-1; i++){
      for(j = n-1; j >= i+1; j--){
         if(C1[j].value < C1[j-1].value){
            C3 = C1[j];
            C1[j] = C1[j-1];
            C1[j-1] = C3;
         }
      }
   }


   for(i = 0; i <= n-1; i++){
      mini = i;
      for(j = i; j <= n-1; j++){
         if(C2[j].value < C2[mini].value){
            minj = j;
         }
      }
      if(mini != i){
         C3 = C2[j];
         C2[j] = C2[mini];
         C2[mini] = C3;
      }
   }



   for(i = 0; i < n; i++){
      if(i){
         printf(" ");
      }
      printf("%c%c", C1[i].suit, C1[i].value);
   }
   printf("\nStable\n");


   for(i = 0; i < n; i++){
      if(i){
         printf(" ");
      }
      printf("%c%c", C2[i].suit, C2[i].value);
      if(C1[i].suit == C2[i].suit){
         check++;
      }
   }


   if(check == n){
      printf("\nStable\n");
   }else{
      printf("\nNot stable\n");
   }

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:42:13: error: 'minj' undeclared (first use in this function); did you mean 'mini'?
   42 |             minj = j;
      |             ^~~~
      |             mini
main.c:42:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:69:10: error: 'check' undeclared (first use in this function)
   69 |          check++;
      |          ^~~~~
Language: C

#include<stdio.h>

struct card{
  char design[100];
  int num;
};

void bubble(struct card a[], int N){
  int i, j, temp;
  int flag = 1;
  for (i=0; flag==1; i++) {
    flag = 0;
    for (j=N-1; j>=i+1; j--) {
      if (a[j-1].num > a[j].num) {
        temp       = a[j-1].num; 
        a[j-1].num = a[j].num;
        a[j].num   = temp;
        char *t             = a[j-1].design;
        a[j-1].design = a[j].design;
        a[j].design   = *t;
        flag = 1;
      }
    }
  }
}
void selection(struct card a[], int N){
  int i, j, temp, minj;
  char t;
  for (i=0; i<N; i++) {
    minj = i;
    for (j=i; j<N; j++) {
      if (a[j].num < a[minj].num)
        minj = j;
    }
    temp       = a[j-1].num;
    a[j-1].num = a[j].num;
    a[j].num   = temp;
    t             = a[j-1].design;
    a[j-1].design = a[j].design;
    a[j].design   = t;
  }
}
void print(struct card a[], int N){
  int i;
  for (i=0; i<N; i++) {
    if (i>0)
      putchar(' ');
    printf("%c%d", 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(){
  struct card c1[100], c2[100];
  int N, i;

  scanf("%d", &N);
  for (i=0; i<N; i++)
    scanf("%c%d", &c1[i].design, &c1[i].num);

  for (i=0; i<N; i++) {
    c2[i].design = c1[i].design;
    c2[i].num    = c1[i].num;
  }

  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:19:23: error: assignment to expression with array type
   19 |         a[j-1].design = a[j].design;
      |                       ^
main.c:20:23: error: assignment to expression with array type
   20 |         a[j].design   = *t;
      |                       ^
main.c: In function 'selection':
main.c:38:19: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   38 |     t             = a[j-1].design;
      |                   ^
main.c:39:19: error: assignment to expression with array type
   39 |     a[j-1].design = a[j].design;
      |                   ^
main.c:40:19: error: assignment to expression with array type
   40 |     a[j].design   = t;
      |                   ^
main.c: In function 'main':
main.c:70:18: error: assignment to expression with array type
   70 |     c2[i].design = c1[i].design;
      |                  ^
Language: C

#include<stdio.h>
 
typedef struct{
  char mark;
  int  num;
} card;
int main()
{
   
  int n, i, j, minj, stable;
  card data[35];
  card data_copy[35];
  card A;
  stable = 1;
  scanf("%d", &n);
  for(i = 0; i < n; i++){
    scanf("%1s%d", &data[i].mark, &data[i].num);
  }
  
   
  for(i = 0; i < n; i++){
    data_copy[i] = data[i];
  }
   
  //Bubble
  for(i = 0; i < n; i++){
    for(j = n-1; j > i; j--){
      if (data[j].num < data[j-1].num){
        A = data[j];
        data[j] = data[j-1];
        data[j-1] = A;
      }
    }
  }
  
  printf("%c%d", data[0].mark, data[0].num);
  for (i = 1; i < n; i++){
    printf(" %c%d", data[i].mark, data[i].num);
  }
  printf("\n");
  printf("Stable\n");
 
  //Selection
 
  for(i = 0; i < n; i++){
    data[i] = data_copy[i];
  }
   
  for(i = 0; i < n; i++){
    minj = i;
    for(j = i; j < n; j++){
      if(data[j].num < data[minj].num);
        if data[j].num == data[minj]{
          stable = 0;
        }
        minj = j;
      }
      A = data[i];
      data[i] = data[minj];
      data[minj] = A;
    }
  }
   
  printf("%c%d", data[0].mark, data[0],num);
  for(i = 0; i < n; i++){
    printf(" %c%d", data[i].mark, data[i].num);
  }
  printf("\n");
  if (stable == 1){
    printf("Stable");
  }else{
    printf("Not stable");
  }
}

Compiler output:
main.c: In function 'main':
main.c:53:12: error: expected '(' before 'data'
   53 |         if data[j].num == data[minj]{
      |            ^~~~
      |            (
main.c: At top level:
main.c:64:10: error: expected declaration specifiers or '...' before string constant
   64 |   printf("%c%d", data[0].mark, data[0],num);
      |          ^~~~~~
main.c:64:18: error: unknown type name 'data'
   64 |   printf("%c%d", data[0].mark, data[0],num);
      |                  ^~~~
main.c:64:32: error: unknown type name 'data'
   64 |   printf("%c%d", data[0].mark, data[0],num);
      |                                ^~~~
main.c:64:40: error: unknown type name 'num'; did you mean 'enum'?
   64 |   printf("%c%d", data[0].mark, data[0],num);
      |                                        ^~~
      |                                        enum
main.c:65:3: error: expected identifier or '(' before 'for'
   65 |   for(i = 0; i < n; i++){
      |   ^~~
main.c:65:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   65 |   for(i = 0; i < n; i++){
      |                ^
main.c:65:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   65 |   for(i = 0; i < n; i++){
      |                      ^~
main.c:68:10: error: expected declaration specifiers or '...' before string constant
   68 |   printf("\n");
      |          ^~~~
main.c:69:3: error: expected identifier or '(' before 'if'
   69 |   if (stable == 1){
      |   ^~
main.c:71:4: error: expected identifier or '(' before 'else'
   71 |   }else{
      |    ^~~~
main.c:74:1: error: expected identifier or '(' before '}' token
   74 | }
      | ^
Language: C

#include<stdio.h>

struct card{
  char design[100];
  int num;
};

void bubble(struct card a[], int N){
  int i, j, temp;
  int flag = 1;
  char *t;
  for (i=0; flag==1; i++) {
    flag = 0;
    for (j=N-1; j>=i+1; j--) {
      if (a[j-1].num > a[j].num) {
        temp       = a[j-1].num; 
        a[j-1].num = a[j].num;
        a[j].num   = temp;
        *t            = a[j-1].design;
        a[j-1].design = a[j].design;
        a[j].design   = *t;
        flag = 1;
      }
    }
  }
}
void selection(struct card a[], int N){
  int i, j, temp, minj;
  char t;
  for (i=0; i<N; i++) {
    minj = i;
    for (j=i; j<N; j++) {
      if (a[j].num < a[minj].num)
        minj = j;
    }
    temp       = a[j-1].num;
    a[j-1].num = a[j].num;
    a[j].num   = temp;
    t             = a[j-1].design;
    a[j-1].design = a[j].design;
    a[j].design   = t;
  }
}
void print(struct card a[], int N){
  int i;
  for (i=0; i<N; i++) {
    if (i>0)
      putchar(' ');
    printf("%c%d", 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(){
  struct card c1[100], c2[100];
  int N, i;

  scanf("%d", &N);
  for (i=0; i<N; i++)
    scanf("%c%d", &c1[i].design, &c1[i].num);

  for (i=0; i<N; i++) {
    c2[i].design = c1[i].design;
    c2[i].num    = c1[i].num;
  }

  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:19:23: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   19 |         *t            = a[j-1].design;
      |                       ^
main.c:20:23: error: assignment to expression with array type
   20 |         a[j-1].design = a[j].design;
      |                       ^
main.c:21:23: error: assignment to expression with array type
   21 |         a[j].design   = *t;
      |                       ^
main.c: In function 'selection':
main.c:39:19: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   39 |     t             = a[j-1].design;
      |                   ^
main.c:40:19: error: assignment to expression with array type
   40 |     a[j-1].design = a[j].design;
      |                   ^
main.c:41:19: error: assignment to expression with array type
   41 |     a[j].design   = t;
      |                   ^
main.c: In function 'main':
main.c:71:18: error: assignment to expression with array type
   71 |     c2[i].design = c1[i].design;
      |                  ^
Language: C

#include<stdio.h>

struct card{
  char design[100];
  int num;
};

void bubble(struct card a[], int N){
  int i, j, temp;
  int flag = 1;
  char *t;
  for (i=0; flag==1; i++) {
    flag = 0;
    for (j=N-1; j>=i+1; j--) {
      if (a[j-1].num > a[j].num) {
        temp       = a[j-1].num; 
        a[j-1].num = a[j].num;
        a[j].num   = temp;
        t            = a[j-1].design;
        a[j-1].design = a[j].design;
        a[j].design   = *t;
        flag = 1;
      }
    }
  }
}
void selection(struct card a[], int N){
  int i, j, temp, minj;
  char *t;
  for (i=0; i<N; i++) {
    minj = i;
    for (j=i; j<N; j++) {
      if (a[j].num < a[minj].num)
        minj = j;
    }
    temp       = a[j-1].num;
    a[j-1].num = a[j].num;
    a[j].num   = temp;
    t             = a[j-1].design;
    a[j-1].design = a[j].design;
    a[j].design   = *t;
  }
}
void print(struct card a[], int N){
  int i;
  for (i=0; i<N; i++) {
    if (i>0)
      putchar(' ');
    printf("%c%d", 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(){
  struct card c1[100], c2[100];
  int N, i;

  scanf("%d", &N);
  for (i=0; i<N; i++)
    scanf("%c%d", &c1[i].design, &c1[i].num);

  for (i=0; i<N; i++) {
    c2[i].design = c1[i].design;
    c2[i].num    = c1[i].num;
  }

  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:20:23: error: assignment to expression with array type
   20 |         a[j-1].design = a[j].design;
      |                       ^
main.c:21:23: error: assignment to expression with array type
   21 |         a[j].design   = *t;
      |                       ^
main.c: In function 'selection':
main.c:40:19: error: assignment to expression with array type
   40 |     a[j-1].design = a[j].design;
      |                   ^
main.c:41:19: error: assignment to expression with array type
   41 |     a[j].design   = *t;
      |                   ^
main.c: In function 'main':
main.c:71:18: error: assignment to expression with array type
   71 |     c2[i].design = c1[i].design;
      |                  ^
Language: C

#include<stdio.h>

struct card{
  char design[100];
  int num;
};

void bubble(struct card a[], int N){
  int i, j, temp;
  int flag = 1;
  char *t;
  for (i=0; flag==1; i++) {
    flag = 0;
    for (j=N-1; j>=i+1; j--) {
      if (a[j-1].num > a[j].num) {
        temp       = a[j-1].num; 
        a[j-1].num = a[j].num;
        a[j].num   = temp;
        t            = a[j-1].design;
        a[j-1].design = a[j].design;
        a[j].design   = t;
        flag = 1;
      }
    }
  }
}
void selection(struct card a[], int N){
  int i, j, temp, minj;
  char *t;
  for (i=0; i<N; i++) {
    minj = i;
    for (j=i; j<N; j++) {
      if (a[j].num < a[minj].num)
        minj = j;
    }
    temp       = a[j-1].num;
    a[j-1].num = a[j].num;
    a[j].num   = temp;
    t             = a[j-1].design;
    a[j-1].design = a[j].design;
    a[j].design   = t;
  }
}
void print(struct card a[], int N){
  int i;
  for (i=0; i<N; i++) {
    if (i>0)
      putchar(' ');
    printf("%c%d", 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(){
  struct card c1[100], c2[100];
  int N, i;

  scanf("%d", &N);
  for (i=0; i<N; i++)
    scanf("%c%d", &c1[i].design, &c1[i].num);

  for (i=0; i<N; i++) {
    c2[i].design = c1[i].design;
    c2[i].num    = c1[i].num;
  }

  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:20:23: error: assignment to expression with array type
   20 |         a[j-1].design = a[j].design;
      |                       ^
main.c:21:23: error: assignment to expression with array type
   21 |         a[j].design   = t;
      |                       ^
main.c: In function 'selection':
main.c:40:19: error: assignment to expression with array type
   40 |     a[j-1].design = a[j].design;
      |                   ^
main.c:41:19: error: assignment to expression with array type
   41 |     a[j].design   = t;
      |                   ^
main.c: In function 'main':
main.c:71:18: error: assignment to expression with array type
   71 |     c2[i].design = c1[i].design;
      |                  ^