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

#include <stdio.h>
int main (){
int x[4][14]={0},a,b,c,d,e;
char y;
scanf ("%d",&a);
for (b=0;b<a;b++){
scanf ("%c %d",&c,&d);
if (c=='S'){
x[1][d]=1;}
else if (c=='H'){
x[2][d]=1;}
else if (c=='C'){
x[3][d]=1;}
else if (c=='D'){
x[4][d]=1;}
for (e=1;e<14;e++){
if (x[1][d]){printf("S %d",e)
}
}
for (e=1;e<14;e++){
if (x[2][d]){printf("H %d",e)
}
}
for (e=1;e<14;e++){
if (x[3][d]){printf("C %d",e)
}
}
for (e=1;e<14;e++){
if (x[4][d]){printf("D %d",e)
}
}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:17:30: error: expected ';' before '}' token
   17 | if (x[1][d]){printf("S %d",e)
      |                              ^
      |                              ;
   18 | }
      | ~                             
main.c:21:30: error: expected ';' before '}' token
   21 | if (x[2][d]){printf("H %d",e)
      |                              ^
      |                              ;
   22 | }
      | ~                             
main.c:25:30: error: expected ';' before '}' token
   25 | if (x[3][d]){printf("C %d",e)
      |                              ^
      |                              ;
   26 | }
      | ~                             
main.c:29:30: error: expected ';' before '}' token
   29 | if (x[4][d]){printf("D %d",e)
      |                              ^
      |                              ;
   30 | }
      | ~                             
main.c:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
Language: C

#include <stdio.h>

int main() {
    int card, rank, i, j;
    int deck[4][14] = {0};
    char ch;
    
    scanf("%d", &card);
    for(i = 1; i <= card; i++) {
        scanf(" %c %d", &ch, &rank);
        
        switch (ch) {
            case 'S':
                deck[0][rank - 1] = 1;
                break;
            case 'H':
                deck[1][rank - 1] = 1;
                break;
            case 'C':
                deck[2][rank - 1] = 1;
                break;
            case 'D':
                deck[3][rank - 1] = 1;
                break;
            default:
                break;
        }
    }
    
    for(i = 0; i < 4; i++) {
        for(j = 0; j < 13; j++) {
            if(deck[i][j] = 0) {
                printf("%c %d\n", suit[i], j + 1);   
            }
        }
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:33:35: error: 'suit' undeclared (first use in this function)
   33 |                 printf("%c %d\n", suit[i], j + 1);
      |                                   ^~~~
main.c:33:35: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main() {
    int card, rank, i, j;
    int deck[4][14] = {0};
    char ch;
    char suit[] = "SHCD"
    
    scanf("%d", &card);
    for(i = 1; i <= card; i++) {
        scanf(" %c %d", &ch, &rank);
        
        switch (ch) {
            case 'S':
                deck[0][rank - 1] = 1;
                break;
            case 'H':
                deck[1][rank - 1] = 1;
                break;
            case 'C':
                deck[2][rank - 1] = 1;
                break;
            case 'D':
                deck[3][rank - 1] = 1;
                break;
            default:
                break;
        }
    }
    
    for(i = 0; i < 4; i++) {
        for(j = 0; j < 13; j++) {
            if(deck[i][j] = 0) {
                printf("%c %d\n", suit[i], j + 1);   
            }
        }
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:5: error: expected ',' or ';' before 'scanf'
    9 |     scanf("%d", &card);
      |     ^~~~~
Language: C

#include <stdio.h>

int main() {
    int card, rank, i, j;
    int deck[4][13] = {0};
    char ch;
    char suit[] = "SHCD";
    
    scanf("%d", &card);
    for(i = 1; i <= card; i++) {
        scanf("%c, &ch);
        scanf("%c %d", &ch, &rank);
        
        switch (ch) {
            case 'S':
                deck[0][rank - 1] = 1;
                break;
            case 'H':
                deck[1][rank - 1] = 1;
                break;
            case 'C':
                deck[2][rank - 1] = 1;
                break;
            case 'D':
                deck[3][rank - 1] = 1;
                break;
            default:
                break;
        }
    }
    
    for(i = 0; i < 4; i++) {
        for(j = 0; j < 13; j++) {
            if(deck[i][j] == 0) {
                printf("%c %d\n", suit[i], j + 1);   
            }
        }
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:15: warning: missing terminating " character
   11 |         scanf("%c, &ch);
      |               ^
main.c:11:15: error: missing terminating " character
   11 |         scanf("%c, &ch);
      |               ^~~~~~~~~~
main.c:12:35: error: expected ')' before ';' token
   12 |         scanf("%c %d", &ch, &rank);
      |                                   ^
      |                                   )
main.c:11:14: note: to match this '('
   11 |         scanf("%c, &ch);
      |              ^
main.c:12:9: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
   12 |         scanf("%c %d", &ch, &rank);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |         |
      |         int
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'int'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:29:10: error: expected ';' before '}' token
   29 |         }
      |          ^
      |          ;
   30 |     }
      |     ~
Language: C

#include <stdio.h>
int main()
{
    int i, n;
    scanf("%d\n",&n);
    int card[4][14];
    for (i=0;i<4;i++){
       for(int j=0;j<14;j++){
            card[i][j]=0;
       }
    }
    char s;
    int r;
    for (i=0;i<n;i++){
        scanf("%c %d\n",&s,&r);
        if (s=='S') card[0][r]=1
        else if (s=='H')card[1][r]=1
        else if (s=='C')card[2][r]=1
        else card[3][r]=1
    }
    for (i=1;i<=13;i++){
        if (card[0][i]==0){
            printf("S %d\n",i);
        }
    }
    for (i=1;i<=13;i++){
        if (card[0][i]==0){
            printf("H %d\n",i);
        }
    }for (i=1;i<=13;i++){
        if (card[0][i]==0){
            printf("C %d\n",i);
        }
    }for (i=1;i<=13;i++){
        if (card[0][i]==0){
            printf("D %d\n",i);
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:33: error: expected ';' before 'else'
   16 |         if (s=='S') card[0][r]=1
      |                                 ^
      |                                 ;
   17 |         else if (s=='H')card[1][r]=1
      |         ~~~~
Language: C

#include<stdio.h>

int main(){

int n[4][13],j,i;
n[4] = {'S','H','C','D'}
for(i = 0; i < 4 ; i++){
  for(j = 0; j < 13; j++){
  n[i][j] = j+1;
  }
}
scanf("%d",&a);
for(int k = 0; k < a; k++){
  scanf("%c %d",&b[k],&c[k]);
  if(b[k] == 'S'&& c[k] != n[0][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'H'&& c[k] != n[1][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'C' && c[k] != n[2][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'D' && c[k] != n[3][k]){
  printf("%c %d",b[k],c[k]);
  }
}

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:8: error: expected expression before '{' token
    6 | n[4] = {'S','H','C','D'}
      |        ^
main.c:13:20: error: 'a' undeclared (first use in this function)
   13 | for(int k = 0; k < a; k++){
      |                    ^
main.c:13:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:18: error: 'b' undeclared (first use in this function)
   14 |   scanf("%c %d",&b[k],&c[k]);
      |                  ^
main.c:14:24: error: 'c' undeclared (first use in this function)
   14 |   scanf("%c %d",&b[k],&c[k]);
      |                        ^
Language: C

#include<stdio.h>

int main(){
char n[4];
int n[4][13],j,i;
n[4] = {'S','H','C','D'}
for(i = 0; i < 4 ; i++){
  for(j = 0; j < 13; j++){
  n[i][j] = j+1;
  }
}
scanf("%d",&a);
for(int k = 0; k < a; k++){
  scanf("%c %d",&b[k],&c[k]);
  if(b[k] == 'S'&& c[k] != n[0][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'H'&& c[k] != n[1][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'C' && c[k] != n[2][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'D' && c[k] != n[3][k]){
  printf("%c %d",b[k],c[k]);
  }
}

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:5: error: conflicting types for 'n'; have 'int[4][13]'
    5 | int n[4][13],j,i;
      |     ^
main.c:4:6: note: previous declaration of 'n' with type 'char[4]'
    4 | char n[4];
      |      ^
main.c:6:8: error: expected expression before '{' token
    6 | n[4] = {'S','H','C','D'}
      |        ^
main.c:13:20: error: 'a' undeclared (first use in this function)
   13 | for(int k = 0; k < a; k++){
      |                    ^
main.c:13:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:18: error: 'b' undeclared (first use in this function)
   14 |   scanf("%c %d",&b[k],&c[k]);
      |                  ^
main.c:14:24: error: 'c' undeclared (first use in this function)
   14 |   scanf("%c %d",&b[k],&c[k]);
      |                        ^
Language: C

#include<stdio.h>

int main(){
char [4];
int n[4][13],j,i,a;
n[4] = {'S','H','C','D'}
for(i = 0; i < 4 ; i++){
  for(j = 0; j < 13; j++){
  n[i][j] = j+1;
  }
}
  int c[k];
  char b[k];
scanf("%d",&a);
for(int k = 0; k < a; k++){
 
  scanf("%c %d",&b[k],&c[k]);
  if(b[k] == 'S'&& c[k] != n[0][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'H'&& c[k] != n[1][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'C' && c[k] != n[2][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'D' && c[k] != n[3][k]){
  printf("%c %d",b[k],c[k]);
  }
}

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:6: error: expected identifier or '(' before '[' token
    4 | char [4];
      |      ^
main.c:6:8: error: expected expression before '{' token
    6 | n[4] = {'S','H','C','D'}
      |        ^
main.c:13:10: error: 'k' undeclared (first use in this function)
   13 |   char b[k];
      |          ^
main.c:13:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:24: error: 'c' undeclared (first use in this function)
   17 |   scanf("%c %d",&b[k],&c[k]);
      |                        ^
Language: C

#include<stdio.h>

int main(){
char [4];
int n[4][13],j,i,a;
n[4] = {'S','H','C','D'}
for(i = 0; i < 4 ; i++){
  for(j = 0; j < 13; j++){
  n[i][j] = j+1;
  }
}
  int c[k],k;
  char b[k];
scanf("%d",&a);
for(k = 0; k < a; k++){
 
  scanf("%c %d",&b[k],&c[k]);
  if(b[k] == 'S'&& c[k] != n[0][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'H'&& c[k] != n[1][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'C' && c[k] != n[2][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'D' && c[k] != n[3][k]){
  printf("%c %d",b[k],c[k]);
  }
}

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:6: error: expected identifier or '(' before '[' token
    4 | char [4];
      |      ^
main.c:6:8: error: expected expression before '{' token
    6 | n[4] = {'S','H','C','D'}
      |        ^
main.c:13:10: error: 'k' undeclared (first use in this function)
   13 |   char b[k];
      |          ^
main.c:13:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:24: error: 'c' undeclared (first use in this function)
   17 |   scanf("%c %d",&b[k],&c[k]);
      |                        ^
Language: C

#include<stdio.h>

int main(){
char n[4];
int n[4][13],j,i,a;
n[4] = {'S','H','C','D'}
for(i = 0; i < 4 ; i++){
  for(j = 0; j < 13; j++){
  n[i][j] = j+1;
  }
}
  int c[k],k;
  char b[k];
scanf("%d",&a);
for(k = 0; k < a; k++){
 
  scanf("%c %d",&b[k],&c[k]);
  if(b[k] == 'S'&& c[k] != n[0][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'H'&& c[k] != n[1][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'C' && c[k] != n[2][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'D' && c[k] != n[3][k]){
  printf("%c %d",b[k],c[k]);
  }
}

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:5: error: conflicting types for 'n'; have 'int[4][13]'
    5 | int n[4][13],j,i,a;
      |     ^
main.c:4:6: note: previous declaration of 'n' with type 'char[4]'
    4 | char n[4];
      |      ^
main.c:6:8: error: expected expression before '{' token
    6 | n[4] = {'S','H','C','D'}
      |        ^
main.c:13:10: error: 'k' undeclared (first use in this function)
   13 |   char b[k];
      |          ^
main.c:13:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:24: error: 'c' undeclared (first use in this function)
   17 |   scanf("%c %d",&b[k],&c[k]);
      |                        ^
Language: C

#include<stdio.h>

int main(){
char d[4];
int n[4][13],j,i,a;
d[4] = {'S','H','C','D'}
for(i = 0; i < 4 ; i++){
  for(j = 0; j < 13; j++){
  n[i][j] = j+1;
  }
}
  int c[k],k;
  char b[k];
scanf("%d",&a);
for(k = 0; k < a; k++){
 
  scanf("%c %d",&b[k],&c[k]);
  if(b[k] == 'S'&& c[k] != n[0][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'H'&& c[k] != n[1][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'C' && c[k] != n[2][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'D' && c[k] != n[3][k]){
  printf("%c %d",b[k],c[k]);
  }
}

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:8: error: expected expression before '{' token
    6 | d[4] = {'S','H','C','D'}
      |        ^
main.c:13:10: error: 'k' undeclared (first use in this function)
   13 |   char b[k];
      |          ^
main.c:13:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:24: error: 'c' undeclared (first use in this function)
   17 |   scanf("%c %d",&b[k],&c[k]);
      |                        ^
Language: C

#include<stdio.h>

int main(){
char d[4];
int n[4][13],j,i,a;
d[4] = {'S','H','C','D'};
for(i = 0; i < 4 ; i++){
  for(j = 0; j < 13; j++){
  n[i][j] = j+1;
  }
}
  int c[k],k;
  char b[k];
scanf("%d",&a);
for(k = 0; k < a; k++){
 
  scanf("%c %d",&b[k],&c[k]);
  if(b[k] == 'S'&& c[k] != n[0][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'H'&& c[k] != n[1][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'C' && c[k] != n[2][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'D' && c[k] != n[3][k]){
  printf("%c %d",b[k],c[k]);
  }
}

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:8: error: expected expression before '{' token
    6 | d[4] = {'S','H','C','D'};
      |        ^
main.c:12:9: error: 'k' undeclared (first use in this function)
   12 |   int c[k],k;
      |         ^
main.c:12:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){

int n[4][13],j,i,a;
for(i = 0; i < 4 ; i++){
  for(j = 0; j < 13; j++){
  n[i][j] = j+1;
  }
}
  int c[k],k;
  char b[k];
scanf("%d",&a);
for(k = 0; k < a; k++){
 
  scanf("%c %d",&b[k],&c[k]);
  if(b[k] == 'S'&& c[k] != n[0][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'H'&& c[k] != n[1][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'C' && c[k] != n[2][k]){
  printf("%c %d",b[k],c[k]);
  }else if(b[k] == 'D' && c[k] != n[3][k]){
  printf("%c %d",b[k],c[k]);
  }
}

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:9: error: 'k' undeclared (first use in this function)
   11 |   int c[k],k;
      |         ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){

int n[4][13],j,i,a,output;
for(i = 0; i < 4 ; i++){
  for(j = 0; j < 13; j++){
  n[i][j] = j+1;
  }
}
  
scanf("%d",&a);
  int c[a],k;
  char b[a];
for(k = 0; k < a; k++){
  scanf("%c %d",&b[k],&c[k]); 
}
for(output = 0; output < 52; output++){
  for(input = 0; input < 13; input++){
    if(b[output] == 'S'&& c[input] != n[0][input]){
    printf("%c %d\n",b[k],n[0][k]);
    }else if(b[output] == 'H'&& c[input] != n[1][input]){
    printf("%c %d\n",b[k],n[1][k]);
    }else if(b[output] == 'C' && c[input] != n[2][input]){
    printf("%c %d\n",b[k],n[2][k]);
    }else if(b[output] == 'D' && c[input] != n[3][input]){
    printf("%c %d\n",b[k],n[3][k]);
    }
  }
}

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:7: error: 'input' undeclared (first use in this function); did you mean 'int'?
   19 |   for(input = 0; input < 13; input++){
      |       ^~~~~
      |       int
main.c:19:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
    int n,a,i,m;
    char b;
    scanf("%d",&n);
    int a[4][13]={0};
    for(i=0;i<=n*2;i++){
        scanf("%c %d",&b,&a);
        switch(b){
            case 'S':
            a[0][a-1] =a;
            break;
            case 'H':
            a[1][a-1] =a;
            break;
            case 'C':
            a[2][a-1] =a;
            break;
            case 'D':
            a[3][a-1] =a;
            break;
        }
    }
    for(i=0;i<4;i++){
        for(m=0;m<13;m++){
            if(a[i][m]==0){
                switch(i){
                    case 0:
                    printf("S %d",m+1);
                    break;
                    case 1:
                    printf("H %d",m+1);
                    break;
                    case 2:
                    printf("C %d",m+1);
                    break;
                    case 3:
                    printf("D %d",m+1);
                    break;
                }
            }
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: conflicting types for 'a'; have 'int[4][13]'
    7 |     int a[4][13]={0};
      |         ^
main.c:4:11: note: previous declaration of 'a' with type 'int'
    4 |     int n,a,i,m;
      |           ^
Language: C

#include<stdio.h>

int main()
{
    int a,b,i, s[13]== h[13]== c[13]== d[13] == {1,2,3,4,5,6,7,8,9,10,11,12,13};
    char s;

    scanf("%d", &a);
    for(;i <= a;)
       {
        scanf("%c%d", &s,&b);
        if (s =='S')s[b] = 0;
        if (s =='H')h[b] = 0;
        if (s =='C')c[b] = 0;
        if (s =='D')d[b] = 0;
    }
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("S %d\n", ,s[i]);}
    for(i=1; i<=13,i++){
	if(h[i] != 0)printf("H %d\n", ,h[i]);}
    for(i=1; i<=13,i++){
	if(c[i] != 0)printf("C %d\n", ,c[i]);}
    for(i=1; i<=13,i++){
	if(d[i] != 0)printf("D %d\n", ,d[i]);}

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token
    5 |     int a,b,i, s[13]== h[13]== c[13]== d[13] == {1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                     ^~
main.c:12:22: error: subscripted value is neither array nor pointer nor vector
   12 |         if (s =='S')s[b] = 0;
      |                      ^
main.c:13:21: error: 'h' undeclared (first use in this function)
   13 |         if (s =='H')h[b] = 0;
      |                     ^
main.c:13:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:21: error: 'c' undeclared (first use in this function)
   14 |         if (s =='C')c[b] = 0;
      |                     ^
main.c:15:21: error: 'd' undeclared (first use in this function)
   15 |         if (s =='D')d[b] = 0;
      |                     ^
main.c:17:23: error: expected ';' before ')' token
   17 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:18:13: error: subscripted value is neither array nor pointer nor vector
   18 |         if(s[i] != 0)printf("S %d\n", ,s[i]);}
      |             ^
main.c:18:39: error: expected expression before ',' token
   18 |         if(s[i] != 0)printf("S %d\n", ,s[i]);}
      |                                       ^
main.c:18:41: error: subscripted value is neither array nor pointer nor vector
   18 |         if(s[i] != 0)printf("S %d\n", ,s[i]);}
      |                                         ^
main.c:19:23: error: expected ';' before ')' token
   19 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:20:39: error: expected expression before ',' token
   20 |         if(h[i] != 0)printf("H %d\n", ,h[i]);}
      |                                       ^
main.c:21:23: error: expected ';' before ')' token
   21 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:22:39: error: expected expression before ',' token
   22 |         if(c[i] != 0)printf("C %d\n", ,c[i]);}
      |                                       ^
main.c:23:23: error: expected ';' before ')' token
   23 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:24:39: error: expected expression before ',' token
   24 |         if(d[i] != 0)printf("D %d\n", ,d[i]);}
      |                                       ^
Language: C

#include<stdio.h>

int main()
{
    int a,b,i, s[13]== h[13]== c[13]== d[13] == {1,2,3,4,5,6,7,8,9,10,11,12,13};
    char s;

    scanf("%d", &a);
    for(;i <= a;)
       {
        scanf("%c%d", &s,&b);
        if (s =='S')s[b] = 0;
        if (s =='H')h[b] = 0;
        if (s =='C')c[b] = 0;
        if (s =='D')d[b] = 0;
    }
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("S %d\n",s[i]);}
    for(i=1; i<=13,i++){
	if(h[i] != 0)printf("H %d\n",h[i]);}
    for(i=1; i<=13,i++){
	if(c[i] != 0)printf("C %d\n",c[i]);}
    for(i=1; i<=13,i++){
	if(d[i] != 0)printf("D %d\n",d[i]);}

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token
    5 |     int a,b,i, s[13]== h[13]== c[13]== d[13] == {1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                     ^~
main.c:12:22: error: subscripted value is neither array nor pointer nor vector
   12 |         if (s =='S')s[b] = 0;
      |                      ^
main.c:13:21: error: 'h' undeclared (first use in this function)
   13 |         if (s =='H')h[b] = 0;
      |                     ^
main.c:13:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:21: error: 'c' undeclared (first use in this function)
   14 |         if (s =='C')c[b] = 0;
      |                     ^
main.c:15:21: error: 'd' undeclared (first use in this function)
   15 |         if (s =='D')d[b] = 0;
      |                     ^
main.c:17:23: error: expected ';' before ')' token
   17 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:18:13: error: subscripted value is neither array nor pointer nor vector
   18 |         if(s[i] != 0)printf("S %d\n",s[i]);}
      |             ^
main.c:18:39: error: subscripted value is neither array nor pointer nor vector
   18 |         if(s[i] != 0)printf("S %d\n",s[i]);}
      |                                       ^
main.c:19:23: error: expected ';' before ')' token
   19 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:21:23: error: expected ';' before ')' token
   21 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:23:23: error: expected ';' before ')' token
   23 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
Language: C

#include<stdio.h>

int main()
{
    int a,b,i, s[13]== h[13]== c[13]== d[13] == {1,2,3,4,5,6,7,8,9,10,11,12,13};
    char s;

    scanf("%d", &a);
    for(;i <= a;){

        scanf("%c%d", &s,&b);
        if (s =='S') s[b] = 0;
        if (s =='H') h[b] = 0;
        if (s =='C') c[b] = 0;
        if (s =='D') d[b] = 0;
    }
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("S %d\n",s[i]);}
    for(i=1; i<=13,i++){
	if(h[i] != 0)printf("H %d\n",h[i]);}
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("C %d\n",c[i]);}
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("D %d\n",d[i]);}

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token
    5 |     int a,b,i, s[13]== h[13]== c[13]== d[13] == {1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                     ^~
main.c:12:23: error: subscripted value is neither array nor pointer nor vector
   12 |         if (s =='S') s[b] = 0;
      |                       ^
main.c:13:22: error: 'h' undeclared (first use in this function)
   13 |         if (s =='H') h[b] = 0;
      |                      ^
main.c:13:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:22: error: 'c' undeclared (first use in this function)
   14 |         if (s =='C') c[b] = 0;
      |                      ^
main.c:15:22: error: 'd' undeclared (first use in this function)
   15 |         if (s =='D') d[b] = 0;
      |                      ^
main.c:17:23: error: expected ';' before ')' token
   17 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:18:13: error: subscripted value is neither array nor pointer nor vector
   18 |         if(s[i] != 0)printf("S %d\n",s[i]);}
      |             ^
main.c:18:39: error: subscripted value is neither array nor pointer nor vector
   18 |         if(s[i] != 0)printf("S %d\n",s[i]);}
      |                                       ^
main.c:19:23: error: expected ';' before ')' token
   19 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:21:23: error: expected ';' before ')' token
   21 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:22:13: error: subscripted value is neither array nor pointer nor vector
   22 |         if(s[i] != 0)printf("C %d\n",c[i]);}
      |             ^
main.c:23:23: error: expected ';' before ')' token
   23 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:24:13: error: subscripted value is neither array nor pointer nor vector
   24 |         if(s[i] != 0)printf("D %d\n",d[i]);}
      |             ^
Language: C

#include<stdio.h>

int main()
{
    int a,b,i, s[13]={1,2,3,4,5,6,7,8,9,10,11,12,13}; 
        h[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
        c[13]= {1,2,3,4,5,6,7,8,9,10,11,12,13};
        d[13]= {1,2,3,4,5,6,7,8,9,10,11,12,13};
    char s;

    scanf("%d", &a);
    for(;i <= a;){

        scanf("%c%d", &s,&b);
        if (s =='S') s[b] = 0;
        if (s =='H') h[b] = 0;
        if (s =='C') c[b] = 0;
        if (s =='D') d[b] = 0;
    }
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("S %d\n",s[i]);}
    for(i=1; i<=13,i++){
	if(h[i] != 0)printf("H %d\n",h[i]);}
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("C %d\n",c[i]);}
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("D %d\n",d[i]);}

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'h' undeclared (first use in this function)
    6 |         h[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
      |         ^
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:15: error: expected expression before '{' token
    6 |         h[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
      |               ^
main.c:7:9: error: 'c' undeclared (first use in this function)
    7 |         c[13]= {1,2,3,4,5,6,7,8,9,10,11,12,13};
      |         ^
main.c:7:16: error: expected expression before '{' token
    7 |         c[13]= {1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                ^
main.c:8:9: error: 'd' undeclared (first use in this function)
    8 |         d[13]= {1,2,3,4,5,6,7,8,9,10,11,12,13};
      |         ^
main.c:8:16: error: expected expression before '{' token
    8 |         d[13]= {1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                ^
main.c:9:10: error: conflicting types for 's'; have 'char'
    9 |     char s;
      |          ^
main.c:5:16: note: previous definition of 's' with type 'int[13]'
    5 |     int a,b,i, s[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                ^
main.c:20:23: error: expected ';' before ')' token
   20 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:22:23: error: expected ';' before ')' token
   22 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:24:23: error: expected ';' before ')' token
   24 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:26:23: error: expected ';' before ')' token
   26 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
Language: C

#include<stdio.h>

int main()
{
    int a,b,i, s[13]={1,2,3,4,5,6,7,8,9,10,11,12,13}; 
    int h[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
    int c[13]= {1,2,3,4,5,6,7,8,9,10,11,12,13};
    int d[13]= {1,2,3,4,5,6,7,8,9,10,11,12,13};
    char s;

    scanf("%d", &a);
    for(;i <= a;){

        scanf("%c%d", &s,&b);
        if (s =='S') s[b] = 0;
        if (s =='H') h[b] = 0;
        if (s =='C') c[b] = 0;
        if (s =='D') d[b] = 0;
    }
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("S %d\n",s[i]);}
    for(i=1; i<=13,i++){
	if(h[i] != 0)printf("H %d\n",h[i]);}
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("C %d\n",c[i]);}
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("D %d\n",d[i]);}

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:10: error: conflicting types for 's'; have 'char'
    9 |     char s;
      |          ^
main.c:5:16: note: previous definition of 's' with type 'int[13]'
    5 |     int a,b,i, s[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                ^
main.c:20:23: error: expected ';' before ')' token
   20 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:22:23: error: expected ';' before ')' token
   22 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:24:23: error: expected ';' before ')' token
   24 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:26:23: error: expected ';' before ')' token
   26 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
Language: C

#include<stdio.h>

int main()
{
    int a,b,i, s[13]={1,2,3,4,5,6,7,8,9,10,11,12,13}; 
    int h[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
    int c[13]= {1,2,3,4,5,6,7,8,9,10,11,12,13};
    int d[13]= {1,2,3,4,5,6,7,8,9,10,11,12,13};
    char e;

    scanf("%d", &a);
    for(;i <= a;){

        scanf("%c%d", &e,&b);
        if (e =='S') s[b] = 0;
        if (e =='H') h[b] = 0;
        if (e =='C') c[b] = 0;
        if (e =='D') d[b] = 0;
    }
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("S %d\n",s[i]);}
    for(i=1; i<=13,i++){
	if(h[i] != 0)printf("H %d\n",h[i]);}
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("C %d\n",c[i]);}
    for(i=1; i<=13,i++){
	if(s[i] != 0)printf("D %d\n",d[i]);}

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:20:23: error: expected ';' before ')' token
   20 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:22:23: error: expected ';' before ')' token
   22 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:24:23: error: expected ';' before ')' token
   24 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
main.c:26:23: error: expected ';' before ')' token
   26 |     for(i=1; i<=13,i++){
      |                       ^
      |                       ;
Language: C

#include<stdio.h>

int main()
{
    int a,b,i, s[13]=int h[13]=int c[13]=int d[13]={1,2,3,4,5,6,7,8,9,10,11,12,13}; 
    char e;

    scanf("%d", &a);
    for(;i <= a;){

        scanf("%c%d", &e,&b);
        if (e =='S') s[b] = 0;
        if (e =='H') h[b] = 0;
        if (e =='C') c[b] = 0;
        if (e =='D') d[b] = 0;
    }
    for(i=1; i<=13;i++){
	if(s[i] != 0)printf("S %d\n",s[i]);}
    for(i=1; i<=13;i++){
	if(h[i] != 0)printf("H %d\n",h[i]);}
    for(i=1; i<=13;i++){
	if(s[i] != 0)printf("C %d\n",c[i]);}
    for(i=1; i<=13;i++){
	if(s[i] != 0)printf("D %d\n",d[i]);}

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:22: error: expected expression before 'int'
    5 |     int a,b,i, s[13]=int h[13]=int c[13]=int d[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                      ^~~
main.c:13:22: error: 'h' undeclared (first use in this function)
   13 |         if (e =='H') h[b] = 0;
      |                      ^
main.c:13:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:22: error: 'c' undeclared (first use in this function)
   14 |         if (e =='C') c[b] = 0;
      |                      ^
main.c:15:22: error: 'd' undeclared (first use in this function)
   15 |         if (e =='D') d[b] = 0;
      |                      ^
Language: C

#include<stdio.h>

int main()
{
    int a,b,i, s[13]= h[13]= c[13]= d[13]={1,2,3,4,5,6,7,8,9,10,11,12,13}; 
    char e;

    scanf("%d", &a);
    for(;i <= a;){

        scanf("%c%d", &e,&b);
        if (e =='S') s[b] = 0;
        if (e =='H') h[b] = 0;
        if (e =='C') c[b] = 0;
        if (e =='D') d[b] = 0;
    }
    for(i=1; i<=13;i++){
	if(s[i] != 0)printf("S %d\n",s[i]);}
    for(i=1; i<=13;i++){
	if(h[i] != 0)printf("H %d\n",h[i]);}
    for(i=1; i<=13;i++){
	if(s[i] != 0)printf("C %d\n",c[i]);}
    for(i=1; i<=13;i++){
	if(s[i] != 0)printf("D %d\n",d[i]);}

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:23: error: 'h' undeclared (first use in this function)
    5 |     int a,b,i, s[13]= h[13]= c[13]= d[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                       ^
main.c:5:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:30: error: 'c' undeclared (first use in this function)
    5 |     int a,b,i, s[13]= h[13]= c[13]= d[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                              ^
main.c:5:37: error: 'd' undeclared (first use in this function)
    5 |     int a,b,i, s[13]= h[13]= c[13]= d[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                                     ^
main.c:5:43: error: expected expression before '{' token
    5 |     int a,b,i, s[13]= h[13]= c[13]= d[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
      |                                           ^
Language: C

#include<stdio.h>
int main(void){
int n,r[52],k,a,b,c;
char e[52],d;
scanf("%d",&n);
for(a=0;a<n;a++)scanf("%c %d",&e[a],&r[a]);

for(a=0;a<n;a++){
for(b=a+1;b<n;b++){
if(e[a]=='S'){
if(e[a]==e[b]&&r[a]>r[b]){
c=r[a];
r[a]=r[b];
r[b]=c;
}
}
else {
if(e[b]=='S'){
d=e[a];
e[a]=e[b];
e[b]=d;
c=r[a];
r[a]=r[b];
r[b]=c;
}
}
}
}

for(a=0;a<n;a++){
for(b=a+1;b<n;b++){
if(e[a]=='S')break;
if(e[a]=='H'){
if(e[a]==e[b]&&r[a]>a[b]){
c=r[a];
r[a]=r[b];
r[b]=c;
}
}else{
if(e[b]=='H'){
d=e[a];
e[a]=e[b];
e[b]=d;
c=r[a];
r[a]=r[b];
r[b]=r[a];
}
}
}
}

for(a=0;a<n;a++){
for(b=a+1;b<n;b++){
if(e[a]=='S'||e[a]=='H')break;
if(e[a]=='C'){
if(e[a]==e[b]&&r[a]>a[b]){
c=r[a];
r[a]=r[b];
r[b]=c;
}
}else{
if(e[b]=='C'){
d=e[a];
e[a]=e[b];
e[b]=d;
c=r[a];
r[a]=r[b];
r[b]=r[a];
}
}
}
}

for(a=0;a<n;a++){
for(b=a+1;b<n;b++){
if(e[a]!='D')break;
if(e[a]==e[b]&&r[a]>a[b]){
c=r[a];
r[a]=r[b];
r[b]=c;
}
}
}

b=0;
c=1;
for(a=1;a<=52;a++){
if(r[b]!=c)printf("%c %d\n",e[b],r[b]);
else b++;
c++;
}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:34:22: error: subscripted value is neither array nor pointer nor vector
   34 | if(e[a]==e[b]&&r[a]>a[b]){
      |                      ^
main.c:56:22: error: subscripted value is neither array nor pointer nor vector
   56 | if(e[a]==e[b]&&r[a]>a[b]){
      |                      ^
main.c:77:22: error: subscripted value is neither array nor pointer nor vector
   77 | if(e[a]==e[b]&&r[a]>a[b]){
      |                      ^
Language: C

#include<stdio.h>
int main(void){
int n,a,b,c,card[5][13];
char e,d;
for(a=0;a<=4;a++){
for(b=0;b<13;b++)card[a][b]=0;
}
scanf("%d",&n);
for(a=0;a<n;a++){
scanf("%c %d",&e,&r);
if(e=='S')c=0;
else if(e=='H')c=1;
else if(e=='C')c=2;
else (e=='D')c=3;
card[c][r-1]=1;
}
for(a=0;a<5;a++){
for(b=0;b<13;b++){
if(card[a][b]==0){
if(a==0)e='S';
else if(a==1)e='H';
else if(a==2)e='c';
else e='D';
r=b+1;
printf("%c %d\n",e,r);
}
}
}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:19: error: 'r' undeclared (first use in this function)
   10 | scanf("%c %d",&e,&r);
      |                   ^
main.c:10:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:14: error: expected ';' before 'c'
   14 | else (e=='D')c=3;
      |              ^
      |              ;
Language: C

#include<stdio.h>
int main(void){
int n,a,b,c,card[4][13];
char e;
for(a=0;a<4;a++){
for(b=0;b<13;b++)card[a][b]=0;
}
scanf("%d",&n);
for(a=0;a<n;a++){
scanf("%c %d",&e,&r);
if(e=='S')c=0;
else if(e=='H')c=1;
else if(e=='C')c=2;
else (e=='D')c=3;
card[c][r-1]=1;
}
for(a=0;a<4;a++){
for(b=0;b<13;b++){
if(card[a][b]==0){
if(a==0)e='S';
else if(a==1)e='H';
else if(a==2)e='c';
else e='D';
r=b+1;
printf("%c %d\n",e,r);
}
}
}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:19: error: 'r' undeclared (first use in this function)
   10 | scanf("%c %d",&e,&r);
      |                   ^
main.c:10:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:14: error: expected ';' before 'c'
   14 | else (e=='D')c=3;
      |              ^
      |              ;
Language: C

#include<stdio.h>
int main(void){
    int cards[4][13];
    char m,d;
    int n,i,j,c;
    for(i=0;i<4;i++){
        for(j=0;j<13;j++){
            t[i][j]=0;
        }
    }
    scanf("%d",&c);
    for(i=0;i<c;i++){
        scamf("%c",&d);
    scanf("%c %d",&m,&n);
    if(m=='S'){
        t[0][n]=1;
    }else if(m=='H'){
        t[1][n]=1;
    }else if(m=='C'){
        t[2][n]=1;
    }else if(m=='D'){
        t[3][n]=1;
    }
    }
    for(j=1;j<=13;j++){
        if(t[0][n]!=1){
            printf("S %d\n",j);
        }
    }
    for(j=1;j<=13;j++){
        if(t[1][n]!=1){
            printf("H %d\n",j);
        }
    }
    for(j=1;j<=13;j++){
        if(t[2][n]!=1){
            printf("C %d\n",j);
        }
    }
    for(j=1;j<=13;j++){
        if(t[3][n]!=1){
            printf("d %d\n",j);
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:13: error: 't' undeclared (first use in this function)
    8 |             t[i][j]=0;
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:9: error: implicit declaration of function 'scamf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   13 |         scamf("%c",&d);
      |         ^~~~~
      |         scanf
Language: C

#include<stdio.h>
int main(void){
    int cards[4][14];
    char m,d;
    int n,i,j,c;
    for(i=0;i<4;i++){
        for(j=0;j<13;j++){
            t[i][j]=0;
        }
    }
    scanf("%d",&c);
    for(i=0;i<c;i++){
        scamf("%c",&d);
    scanf("%c %d",&m,&n);
    if(m=='S'){
        t[0][n]=1;
    }else if(m=='H'){
        t[1][n]=1;
    }else if(m=='C'){
        t[2][n]=1;
    }else if(m=='D'){
        t[3][n]=1;
    }
    }
    for(j=1;j<14;j++){
        if(t[0][n]!=1){
            printf("S %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[1][n]!=1){
            printf("H %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[2][n]!=1){
            printf("C %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[3][n]!=1){
            printf("d %d\n",j);
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:13: error: 't' undeclared (first use in this function)
    8 |             t[i][j]=0;
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:9: error: implicit declaration of function 'scamf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   13 |         scamf("%c",&d);
      |         ^~~~~
      |         scanf
Language: C

#include<stdio.h>
int main(void){
    int cards[4][14];
    char m,d;
    int n,i,j,c;
    for(i=0;i<4;i++){
        for(j=0;j<14;j++){
            t[i][j]=0;
        }
    }
    scanf("%d",&c);
    for(i=0;i<c;i++){
        scamf("%c",&d);
    scanf("%c %d",&m,&n);
    if(m=='S'){
        t[0][n]=1;
    }else if(m=='H'){
        t[1][n]=1;
    }else if(m=='C'){
        t[2][n]=1;
    }else if(m=='D'){
        t[3][n]=1;
    }
    }
    for(j=1;j<14;j++){
        if(t[0][n]!=1){
            printf("S %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[1][n]!=1){
            printf("H %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[2][n]!=1){
            printf("C %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[3][n]!=1){
            printf("d %d\n",j);
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:13: error: 't' undeclared (first use in this function)
    8 |             t[i][j]=0;
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:9: error: implicit declaration of function 'scamf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   13 |         scamf("%c",&d);
      |         ^~~~~
      |         scanf
Language: C

#include<stdio.h>
int main(void){
    int cards[4][14];
    char m,d;
    int n,i,j,c;
    for(i=0;i<4;i++){
        for(j=0;j<14;j++){
            t[i][j]=0;
        }
    }
    scanf("%d",&c);
    for(i=0;i<c;i++){
        scanf("%c",&d);
    scanf("%c %d",&m,&n);
    if(m=='S'){
        t[0][n]=1;
    }else if(m=='H'){
        t[1][n]=1;
    }else if(m=='C'){
        t[2][n]=1;
    }else if(m=='D'){
        t[3][n]=1;
    }
    }
    for(j=1;j<14;j++){
        if(t[0][n]!=1){
            printf("S %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[1][n]!=1){
            printf("H %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[2][n]!=1){
            printf("C %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[3][n]!=1){
            printf("d %d\n",j);
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:13: error: 't' undeclared (first use in this function)
    8 |             t[i][j]=0;
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void){
    int cards[4][14];
    char m,d;
    int n,i,j,c;
    for(i=0;i<4;i++){
        for(j=0;j<14;j++){
            t[i][j]=0;
        }
    }
    scanf("%d",&c);
    for(i=0;i<c;i++){
        scanf("%c",&d);
    scanf("%c %d",&m,&n);
    if(m=='S'){
        t[0][n]=1;
    }else if(m=='H'){
        t[1][n]=1;
    }else if(m=='C'){
        t[2][n]=1;
    }else if(m=='D'){
        t[3][n]=1;
    }
    }
    for(j=1;j<14;j++){
        if(t[0][n] !=1){
            printf("S %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[1][n] !=1){
            printf("H %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[2][n] !=1){
            printf("C %d\n",j);
        }
    }
    for(j=1;j<14;j++){
        if(t[3][n] !=1){
            printf("D %d\n",j);
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:13: error: 't' undeclared (first use in this function)
    8 |             t[i][j]=0;
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h><font></font>
<font></font>
int main(void)<font></font>
{<font></font>
    int n;<font></font>
    int card[52]={};<font></font>
    int i, no;<font></font>
    char c;<font></font>
    scanf("%d\n", &n);<font></font>
    for(i=0; i<n; i++) {<font></font>
        if(i<n-1) {<font></font>
            scanf("%c%d\n", &c, &no);<font></font>
        }<font></font>
        else scanf("%c%d", &c, &no);<font></font>
        no--;<font></font>
        if(c=='S') card[no]=1;<font></font>
        else if(c=='H') card[no+13]=1;<font></font>
        else if(c=='C') card[no+26]=1;<font></font>
        else if(c=='D') card[no+39]=1;<font></font>
    }<font></font>
    <font></font>
    for(i=0; i<52; i++) {<font></font>
        if(card[i]==0) {<font></font>
            if(i/13==0) printf("S %d\n", i%13+1);<font></font>
            else if(i/13==1) printf("H %d\n", i%13+1);<font></font>
            else if(i/13==2) printf("C %d\n", i%13+1);<font></font>
            else if(i/13==3) printf("D %d\n", i%13+1);<font></font>
        }<font></font>
    }<font></font>
    return 0;<font></font>
}<font></font>


Compiler output:
main.c:1:19: warning: extra tokens at end of #include directive
    1 | #include <stdio.h><font></font>
      |                   ^~~~~~
main.c:2:1: error: expected identifier or '(' before '<' token
    2 | <font></font>
      | ^
main.c:31:2: error: expected identifier or '(' before '<' token
   31 | }<font></font>
      |  ^
Language: C

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
 
int main()
{
    int i, n, id, rank;
    short card[4][14];
    char buf[100], *p;
    char ids[4] = { 'S', 'H', 'C', 'D' };
 
    for (id = 0; id < 4; id++) {
        for (rank = 1; rank <= 13; rank++) card[id][rank] = 1;
    }
    gets(buf);
    n = atoi(buf);
    for (i = 0; i < n; i++) {
        gets(buf);
        p = buf;
        while (isspace(*p)) p++;
        switch (*p) {
        case 'S': id = 0; break;
        case 'H': id = 1; break;
        case 'C': id = 2; break;
        case 'D': id = 3; break;
        }
        rank = atoi(++p);
//      printf("id=%d, rank=%d\n", id, rank);
        card[id][rank] = 0;
    }
    for (id = 0; id < 4; id++) {
        for (rank = 1; rank <= 13; rank++) {
            if (card[id][rank]) printf("%c %d\n", ids[id], rank);
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   15 |     gets(buf);
      |     ^~~~
      |     fgets
Language: C

#include<stdio.h>

int main(void)
{
    int Cards[4][14] = {{}}, n, i, j, Num;
    char Mark; 

    scanf("%d", &n);

    for(i = 0; i < 2 * n; i++)
    {
        scanf("%c ", &Mark);
        scanf("%d", &Num;
        
        if(Mark == 'S')
        {
            Cards[0][Num - 1] = 1;
        }

        else if(Mark == 'H')
        {
            Cards[1][Num - 1] = 1;
        }

        else if(Mark == 'C')
        {
            Cards[2][Num - 1] = 1;
        }

        else if(Mark == 'D')
        {
            Cards[3][Num - 1] = 1;
        }
    }

    for(i = 1; j < 14; j++)
    {
        if(Card[0][j - 1] != 1)
        {
            printf("S %d\n", j);
        }
    }

    for(i = 1; j < 14; j++)
    {
        if(Card[1][j - 1] != 1)
        {
            printf("H %d\n", j);
        }
    }

    for(i = 1; j < 14; j++)
    {
        if(Card[2][j - 1] != 1)
        {
            printf("C %d\n", j);
        }
    }

    for(i = 1; j < 14; j++)
    {
        if(Card[3][j - 1] != 1)
        {
            printf("D %d\n", j);
        }
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:25: error: expected ')' before ';' token
   13 |         scanf("%d", &Num;
      |              ~          ^
      |                         )
main.c:33:10: error: expected ';' before '}' token
   33 |         }
      |          ^
      |          ;
   34 |     }
      |     ~     
main.c:38:12: error: 'Card' undeclared (first use in this function); did you mean 'Cards'?
   38 |         if(Card[0][j - 1] != 1)
      |            ^~~~
      |            Cards
main.c:38:12: note: each undeclared identifier is reported only once for each function it appears in