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

#include<stdio.h>

struct card{
    unsigned short rank;
    unsigned char mark;
    unsigned char frg;
}
int main(){
    unsigned short num;
    unsigned short i, j, k;
    unsigned short rank;
    unsigned char mark;
    struct card card[52];
    for(i = 0;i < 4;i++){
        for(j = 0;j < 13;j++){
            card[i * 13j + j].rank = j + 1;
            switch(i){
            case 0:
                card[i * 13 + j].mark = 'S';
                break;
            case 1:
                card[i * 13 + j].mark = 'H';
                break;
            case 2:
                card[i * 13 + j].mark = 'C';
                break;
            case 3:
                card[i * 13 + j].mark = 'D';
                break;
            defoult:;
            }
            card[i * 13 + j].frg = 0;
        }
    }
    scanf("%d", &num);
    for(i = 0;i < num;i++){
        scanf("%c %d", &mark, &rank);
        for(j = 0;j < 52;j++){
            if(card[j].mark == mark && card[j].rank == rank){
                card[j].frg = 1; 
            }
        }
    }
    for(i = 0;i < 52;i++){
        if(card[i] == 0){
            printf("%c %d\n", card[i].mark, card[i].rank);
        }
    }
    return 0;
}


Compiler output:
main.c:8:1: error: expected ';', identifier or '(' before 'int'
    8 | int main(){
      | ^~~
main.c: In function 'main':
main.c:16:17: error: array subscript is not an integer
   16 |             card[i * 13j + j].rank = j + 1;
      |                 ^
main.c:45:20: error: invalid operands to binary == (have 'struct card' and 'int')
   45 |         if(card[i] == 0){
      |            ~~~~~~~ ^~
      |                |
      |                struct card
Language: C

#include<stdio.h>

struct card{
    unsigned short rank;
    unsigned char mark;
    unsigned char frg;
}
int main(){
    unsigned short num;
    unsigned short i, j, k;
    unsigned short rank;
    unsigned char mark;
    struct card card[52];
    for(i = 0;i < 4;i++){
        for(j = 0;j < 13;j++){
            card[i * 13 + j].rank = j + 1;
            switch(i){
            case 0:
                card[i * 13 + j].mark = 'S';
                break;
            case 1:
                card[i * 13 + j].mark = 'H';
                break;
            case 2:
                card[i * 13 + j].mark = 'C';
                break;
            case 3:
                card[i * 13 + j].mark = 'D';
                break;
            defoult:;
            }
            card[i * 13 + j].frg = 0;
        }
    }
    scanf("%d", &num);
    for(i = 0;i < num;i++){
        scanf("%c %d", &mark, &rank);
        for(j = 0;j < 52;j++){
            if(card[j].mark == mark && card[j].rank == rank){
                card[j].frg = 1; 
            }
        }
    }
    for(i = 0;i < 52;i++){
        if(card[i] == 0){
            printf("%c %d\n", card[i].mark, card[i].rank);
        }
    }
    return 0;
}


Compiler output:
main.c:8:1: error: expected ';', identifier or '(' before 'int'
    8 | int main(){
      | ^~~
main.c: In function 'main':
main.c:45:20: error: invalid operands to binary == (have 'struct card' and 'int')
   45 |         if(card[i] == 0){
      |            ~~~~~~~ ^~
      |                |
      |                struct card
Language: C

#include<stdio.h>

struct card{
    unsigned short rank;
    unsigned char mark;
    unsigned char frg;
}
int main(){
    unsigned short num;
    unsigned short i, j, k;
    unsigned short rank;
    unsigned char mark;
    struct card card[52];
    for(i = 0;i < 4;i++){
        for(j = 0;j < 13;j++){
            card[i * 13 + j].rank = j + 1;
            switch(i){
            case 0:
                card[i * 13 + j].mark = 'S';
                break;
            case 1:
                card[i * 13 + j].mark = 'H';
                break;
            case 2:
                card[i * 13 + j].mark = 'C';
                break;
            case 3:
                card[i * 13 + j].mark = 'D';
                break;
            defoult:;
            }
            card[i * 13 + j].frg = 0;
        }
    }
    scanf("%d", &num);
    for(i = 0;i < num;i++){
        scanf("%c %d", &mark, &rank);
        for(j = 0;j < 52;j++){
            if(card[j].mark == mark && card[j].rank == rank){
                card[j].frg = 1; 
            }
        }
    }
    for(i = 0;i < 52;i++){
        if(card[i].frg == 0){
            printf("%c %d\n", card[i].mark, card[i].rank);
        }
    }
    return 0;
}


Compiler output:
main.c:8:1: error: expected ';', identifier or '(' before 'int'
    8 | int main(){
      | ^~~
Language: C

#include<stdio.h>

struct card{
    unsigned short rank;
    unsigned char mark;
    unsigned char frg;
}

int main(){
    unsigned short num;
    unsigned short i, j, k;
    unsigned short rank;
    unsigned char mark;
    struct card card[52];
    for(i = 0;i < 4;i++){
        for(j = 0;j < 13;j++){
            card[i * 13 + j].rank = j + 1;
            switch(i){
            case 0:
                card[i * 13 + j].mark = 'S';
                break;
            case 1:
                card[i * 13 + j].mark = 'H';
                break;
            case 2:
                card[i * 13 + j].mark = 'C';
                break;
            case 3:
                card[i * 13 + j].mark = 'D';
                break;
            defoult:;
            }
            card[i * 13 + j].frg = 0;
        }
    }
    scanf("%d", &num);
    for(i = 0;i < num;i++){
        scanf("%c %d", &mark, &rank);
        for(j = 0;j < 52;j++){
            if(card[j].mark == mark && card[j].rank == rank){
                card[j].frg = 1; 
            }
        }
    }
    for(i = 0;i < 52;i++){
        if(card[i].frg == 0){
            printf("%c %d\n", card[i].mark, card[i].rank);
        }
    }
    return 0;
}


Compiler output:
main.c:9:1: error: expected ';', identifier or '(' before 'int'
    9 | int main(){
      | ^~~
Language: C

#include<stdio.h>
int main(){
    unsigned short num;
    unsigned short i, j, k;
    unsigned short rank;
    unsigned char mark;
    unsigned char dia[13];
    unsigned char spade[13];
    unsigned char crabb[13];
    unsigned char hert[13];
    for(i = 0;i < 13;i++){
        dia[i] = 0;
        spade[i] = 0;
        crabb[i] = 0;
        hert[i] = 0;
    }
    scanf("%d", &num);
    for(i = 0;i < num;i++){
        scanf("%c %d", &mark, &rank);
        swicth(mark){
        case 'D':
            dia[rank - 1] = 1;
            break;
        case 'S':
            spade[rank - 1] = 1;
            break;
        case 'C':
            crabb[rank - 1] = 1;
            break;
        case 'H':
            hert[rank - 1] = 1;
            break;
        defoult:;
        }
    }
    for(i = 0;i < 13;i++){
        if(dia[i] == 0){
            printf("D %d\n", i);
        }
        if(spade[i] == 0){
            printf("S %d\n", i);
        }
        if(crabb[i] == 0){
            printf("C %d\n", i);
        }
        if(hert[i] == 0){
            printf("H %d\n", i);
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:9: error: implicit declaration of function 'swicth' [-Wimplicit-function-declaration]
   20 |         swicth(mark){
      |         ^~~~~~
main.c:20:21: error: expected ';' before '{' token
   20 |         swicth(mark){
      |                     ^
      |                     ;
Language: C

#include<stdio.h>

int main()
{
	int card[52] = {}, num, i, n;
	char mark;
	scanf_s("%d", &n);
	for (i = 0; i < n; i++)
	{
		while (1)
		{
			mark = getchar();
			if (mark != '\n')
				break;
		}
		scanf_s("%d", &num);
		switch (mark)
		{
		case 'S':
			card[num - 1] = 1;
			break;
		case 'H':
			card[num + 12] = 1;
			break;
		case 'C':
			card[num + 25] = 1;
			break;
		case 'D':
			card[num + 38] = 1;
			break;
		}
	}
	for (i = 0; i < 52; i++)
	{
		if (!card[i])
		{
			switch (i / 13)
			{
			case 0:
				printf("S %d\n", i + 1);
				break;
			case 1:
				printf("H %d\n", i - 12);
				break;
			case 2:
				printf("C %d\n", i - 25);
				break;
			case 3:
				printf("D %d\n", i - 38);
				break;
			}
		}
	}

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C

#include <stdio.h>
#include <stdbool.h>

int main(void){
  int n,i,j,rank;
  char mark;
  bool a[4][13] = true;
  scanf("%d",&n);
  for(i = 0; i < n; i++){
    scanf("%c %d",&mark,&rank);//0:S 1:H 2:C 3:D
    a[mark][rank] = false;
  }
  for(mark = 0; mark < 4; mark++){
    for(rank = 0; rank < 13; rank++){
      if(a[mark][rank] == true){
      printf("%c %d\n",rank,mark);
      }
    }
  }
  return 0;
}


Compiler output:
In file included from main.c:2:
main.c: In function 'main':
main.c:7:19: error: invalid initializer
    7 |   bool a[4][13] = true;
      |                   ^~~~
Language: C

#include<stdio.h>
int main()
{
    int i,j,n,l;
    char t,cs[5]={'S','H','C','D','\O'};
    int x[4][13];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%c %d",&t,&l);
        for(j=0;j<4;j++)
        {
            if(cs[j]==c)
            {
                x[j][l-1]=1;
            }
        }
        for(i=0;i<4;i++)
        {
            for(j=0;j<13;j++)
            {
                if(x[i][j]==0)
                {
                printf("%c %d\n",cs[i],x[1+1]);
                }
            }
        }
    }
}



Compiler output:
main.c: In function 'main':
main.c:5:35: warning: unknown escape sequence: '\O'
    5 |     char t,cs[5]={'S','H','C','D','\O'};
      |                                   ^~~~
main.c:13:23: error: 'c' undeclared (first use in this function)
   13 |             if(cs[j]==c)
      |                       ^
main.c:13:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void){
int n,x,a;
char ch;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%c %d",&ch,&x);
switch(ch){
case 'S':
a=15-x;
printf("S %d\n",a);
break;
case 'H':
a=15-x;
printf("H %d\n",a);
break;
case 'C':
a=15-x;
printf("S %d\n",a);
break;
case 'H':
a=15-x;
printf("H %d\n",a);
break;
            }
                  }
return 0;

}



Compiler output:
main.c: In function 'main':
main.c:6:5: error: 'i' undeclared (first use in this function)
    6 | for(i=1;i<=n;i++){
      |     ^
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:1: error: duplicate case value
   21 | case 'H':
      | ^~~~
main.c:13:1: note: previously used here
   13 | case 'H':
      | ^~~~
Language: C

#include<stdio.h>

int main(){
  bool cards[4][14];
  int n,rank;
  char suit;

  for(int s=0;s<4;s++)
    for(int r=1;r<=13;r++)
      cards[s][r]=0;

  scanf("%d",n);
  for(int i=0;i<n;i++){
    scanf("%c%d",suit,rank);
    if(suit=='S') cards[0][rank]=1;
    if(suit=='H') cards[1][rank]=1;
    if(suit=='C') cards[2][rank]=1;
    if(suit=='D') cards[3][rank]=1;
  }

  for(int s=0;s<4;s++){
    for(int r=1;r<=13;r++){
      if(cards[s][r]) continue;
      if(s==0) suit='S';
      if(s==1) suit='H';
      if(s==2) suit='C';
      if(s==3) suit='D';
      printf("%c %d",suit,r);
    }
  }

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:3: error: unknown type name 'bool'
    4 |   bool cards[4][14];
      |   ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 |
Language: C

#include<stdio.h>

int main(){
  bool cards[4][14];
  int n,rank;
  char suit;

  for(int s=0;s<4;s++)
    for(int r=1;r<=13;r++)
      cards[s][r]=0;

  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%c%d",&suit,&rank);
    if(suit=='S') cards[0][rank]=1;
    if(suit=='H') cards[1][rank]=1;
    if(suit=='C') cards[2][rank]=1;
    if(suit=='D') cards[3][rank]=1;
  }

  for(int s=0;s<4;s++){
    for(int r=1;r<=13;r++){
      if(cards[s][r]) continue;
      if(s==0) suit='S';
      if(s==1) suit='H';
      if(s==2) suit='C';
      if(s==3) suit='D';
      printf("%c %d",suit,r);
    }
  }

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:3: error: unknown type name 'bool'
    4 |   bool cards[4][14];
      |   ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 |
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:26:36: error: expected ';' before '}' token
   26 |                 printf("%d\n", j+1)
      |                                    ^
      |                                    ;
   27 |             }
      |             ~
Language: C

#include<stdio.h>

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

  for(int i=0;i<4;i++){
    for(int j=0;j<14;j++){
      if(n[i][j]==0)printf("%c %d",a[i],j);
    }



Compiler output:
main.c: In function 'main':
main.c:23:5: error: expected declaration or statement at end of input
   23 |     }
      |     ^
main.c:23:5: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>

int main()

{
int a[4][13]={0};
int i, j, k, x, n;
char m;
scanf("%d", &n);

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


Compiler output:
main.c: In function 'main':
main.c:38:1: error: expected declaration or statement at end of input
   38 | }
      | ^
main.c:38:1: error: expected declaration or statement at end of input
main.c:38:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>

int main()

{
int a[4][13]={0};
int i, j, k, x, n;
char m;
scanf("%d", &n);

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


Compiler output:
main.c: In function 'main':
main.c:40:1: error: expected declaration or statement at end of input
   40 | }
      | ^
main.c:40:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int main()
{
int i,n,j,k,l;
char s;
int cards[4][13]={{0}};
scanf(“%d”,&n);
for(l=1;l<=n;l++){
scanf(” %c %d”,&s,&k);
switch(s)
{
case ‘S’:
cards[0][k-1]=1;
break;
case ‘H’:
cards[1][k-1]=1;
break;
case ‘C’:
cards[2][k-1]=1;
break;
case ‘D’:
cards[3][k-1]=1;
break;
}

　　}


Compiler output:
main.c: In function 'main':
main.c:7:7: error: stray '\342' in program
    7 | scanf(<U+201C>%d<U+201D>,&n);
      |       ^~~~~~~~
main.c:7:8: error: expected expression before '%' token
    7 | scanf(“%d”,&n);
      |        ^
main.c:7:10: error: stray '\342' in program
    7 | scanf(<U+201C>%d<U+201D>,&n);
      |                 ^~~~~~~~
main.c:9:7: error: stray '\342' in program
    9 | scanf(<U+201D> %c %d<U+201D>,&s,&k);
      |       ^~~~~~~~
main.c:9:9: error: expected expression before '%' token
    9 | scanf(” %c %d”,&s,&k);
      |         ^
main.c:9:14: error: stray '\342' in program
    9 | scanf(<U+201D> %c %d<U+201D>,&s,&k);
      |                     ^~~~~~~~
main.c:12:6: error: stray '\342' in program
   12 | case <U+2018>S<U+2019>:
      |      ^~~~~~~~
main.c:12:8: error: stray '\342' in program
   12 | case <U+2018>S<U+2019>:
      |               ^~~~~~~~
main.c:12:7: error: 'S' undeclared (first use in this function)
   12 | case ‘S’:
      |       ^
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:6: error: stray '\342' in program
   15 | case <U+2018>H<U+2019>:
      |      ^~~~~~~~
main.c:15:8: error: stray '\342' in program
   15 | case <U+2018>H<U+2019>:
      |               ^~~~~~~~
main.c:15:7: error: 'H' undeclared (first use in this function)
   15 | case ‘H’:
      |       ^
main.c:18:6: error: stray '\342' in program
   18 | case <U+2018>C<U+2019>:
      |      ^~~~~~~~
main.c:18:8: error: stray '\342' in program
   18 | case <U+2018>C<U+2019>:
      |               ^~~~~~~~
main.c:18:7: error: 'C' undeclared (first use in this function)
   18 | case ‘C’:
      |       ^
main.c:21:6: error: stray '\342' in program
   21 | case <U+2018>D<U+2019>:
      |      ^~~~~~~~
main.c:21:8: error: stray '\342' in program
   21 | case <U+2018>D<U+2019>:
      |               ^~~~~~~~
main.c:21:7: error: 'D' undeclared (first use in this function)
   21 | case ‘D’:
      |       ^
main.c:26:1: error: stray '\343' in program
   26 | <U+3000><U+3000>}
      | ^~~~~~~~
main.c:26:3: error: stray '\343' in program
   26 | <U+3000><U+3000>}
      |         ^~~~~~~~
main.c:26:1: error: expected declaration or statement at end of input
   26 | 　　}
      | ^~
Language: C

#include<stdio.h>

int main(void)
{
	int n, i, t;
	int S[14], H[14], C[14], D[14];
	char A, temp[50];

	for(i=1; i<=13; i++)
	{
		S[i] = 1;
		H[i] = 1;
		C[i] = 1;
		D[i] = 1;
	}

	scanf("%d", &n);
	gets(temp);
	for( i = 0; i < n; i++)
	{
		scanf("%c %d", &A, &t);
		gets(temp);
		if( 'S' == A )
			S[t] = 0;
		else if( 'H' == A )
			H[t] = 0;
		else if( 'C' == A )
			C[t] = 0;
		else if( 'D' == A )
			D[t] = 0;
	}

	for(i=1; i<=13; i++)
		if(S[i])
			printf("S %d\n", i);
	for(i=1; i<=13; i++)
		if(H[i])
			printf("H %d\n", i);
	for(i=1; i<=13; i++)
		if(C[i])
			printf("C %d\n", i);
	for(i=1; i<=13; i++)
		if(D[i])
			printf("D %d\n", i);

	return 0;
}


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

#include <stdio.h> 
#include <stdbool.h> 
int main(){ 
     int i, j, n; 
     char mark; 
     char marks[4]={'S', 'H', 'C', 'D'}; 
     int num; 
     bool cards[4][13]={false}; 
 
 
     scanf("%d ", &n); 
     for(i=0;i<n;i++){ 
         scanf("%c %d ", &mark, &num); 
         for(j=0;j<4;j++){ 
             if(mark==marks[j]){ 
                cards[j][num-1]=true; 
                 break; 
             } 
         } 
     } 
     for(i=0;i<4;i++){ 
         for(j=0;j<13;j++){ 
             if(!cards[i][j]){ 
                 printf("%c %d\n", marks[i], j+1); 
             } 
         } 
     } 0     return 0; 
 } 



Compiler output:
main.c: In function 'main':
main.c:27:9: error: expected ';' before 'return'
   27 |      } 0     return 0;
      |         ^    ~~~~~~
      |         ;
Language: C

#include <stdio.h>
int main(void){
  int card[4][13];
  int maisuu;
  char gara;
  int rank;

  scanf("%d\n",maisuu);

  for(int i=0; i<maisuu; i++){
    scanf("%c %d\n",&gara,&rank)
    if(gara = 'S'){
      card[0][rank] = 1;
    }else if(gara = 'H'){
      card[1][rank] = 1;
    }else if(gara = 'C'){
      card[2][rank] = 1;
    }else if(gara = 'D'){
      card[3][rank] = 1;
    }
  }

  for(int i=0; i<4; i++) {
    for(int j=1; j<=13; j++){
      if(card[i][j-1] == 0){
        if(i == 0){
          printf("S %d\n",j);
        }else if(i == 1){
          printf("H %d\n",j);
        }if(i == 2){
          printf("C %d\n",j);
        }if(i == 3){
          printf("D %d\n",j);
        }
      }
    }
  }

  return 0;         
}


Compiler output:
main.c: In function 'main':
main.c:11:33: error: expected ';' before 'if'
   11 |     scanf("%c %d\n",&gara,&rank)
      |                                 ^
      |                                 ;
   12 |     if(gara = 'S'){
      |     ~~
Language: C

#include <stdio.h>
int main(void){
  int card[4][13];
  int maisuu;
  char gara;
  int rank;


  for(int i=0; i<4; i++) {
    for(int j=1; j<=13; j++){
      card[i][j] = 0;
    }
  }

  scanf("%d\n",&maisuu);

  for(int i=0; i<maisuu; i++){
    scanf("%c %d\n",&gara,&rank);
    if(gara == 'S'){
      card[0][rank-1] = 1;
    }else if(gara == 'H'){
      card[1][rank-1] = 1;
    }else if(gara == 'C'){
      card[2][rank-1] = 1;
    }else if(gara == 'D'){
      card[3][rank-1] = 1;
    }
  }

 for(j=1;j<=13;j++) {
    if(card[0][j-1] != 1) {
      printf("S %d\n",j);
    }
  }
  for(j=1;j<=13;j++) {
    if(card[1][j-1] != 1) {
      printf("H %d\n",j);
    }
  }
  for(j=1;j<=13;j++) {
    if(card[2][j-1] != 1) {
      printf("C %d\n",j);
    }
  }
  for(j=1;j<=13;j++) {
    if(card[3][j-1] != 1) {
      printf("D %d\n",j);
    }
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:30:6: error: 'j' undeclared (first use in this function)
   30 |  for(j=1;j<=13;j++) {
      |      ^
main.c:30:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(void){
  int card[4][13];
  int maisuu;
  char gara;
  int rank;


  for(int i=0; i<4; i++) {
    for(int j=1; j<=13; j++){
      card[i][j] = 0;
    }
  }

  scanf("%d\n",&maisuu);

  for(int i=0; i<maisuu; i++){
    scanf("%c %d\n",&gara,&rank);
    if(gara == 'S'){
      card[0][rank-1] = 1;
    }else if(gara == 'H'){
      card[1][rank-1] = 1;
    }else if(gara == 'C'){
      card[2][rank-1] = 1;
    }else if(gara == 'D'){
      card[3][rank-1] = 1;
    }
  }

 for(int j=1;j<=13;j++) {
    if(card[0][j-1] != 1) {
      printf("S %d\n",j);
    }
  }
  for(j=1;j<=13;j++) {
    if(card[1][j-1] != 1) {
      printf("H %d\n",j);
    }
  }
  for(j=1;j<=13;j++) {
    if(card[2][j-1] != 1) {
      printf("C %d\n",j);
    }
  }
  for(j=1;j<=13;j++) {
    if(card[3][j-1] != 1) {
      printf("D %d\n",j);
    }
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:35:7: error: 'j' undeclared (first use in this function)
   35 |   for(j=1;j<=13;j++) {
      |       ^
main.c:35:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C


// AIZU ONLINE JUDGE http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=10015
//*
#include <stdio.h>
#include <stdbool.h>

int main(){
    int i, j, n;
    char mark;
    char marks[4]={'S', 'H', 'C', 'D'};
    int num;
    bool cards[4][13]={false};

    scanf("%d ", &n);
    for(i=0;i<n;i++){
        scanf("%c %d ", &mark, &num);
        for(j=0;j<4;j++){
            if(mark==marks[j]){
                cards[j][num-1]=true;
                break;
            }
        }
    }
    for(i=0;i<4;i++){
        for(j=0;j<13;j++){
            if(!cards[i][j]){
                printf("%c %d\n", marks[i], j+1);
            }
        }
    }
    


Compiler output:
main.c: In function 'main':
main.c:30:5: error: expected declaration or statement at end of input
   30 |     }
      |     ^
Language: C


#include <stdio.h>
#include <stdbool.h>

int main(){
    int i, j, n;
    char mark;
    char marks[4]={'S', 'H', 'C', 'D'};
    int num;
    bool cards[4][13]={false};

    scanf("%d ", &n);
    for(i=0;i<n;i++){
        scanf("%c %d ", &mark, &num);
        for(j=0;j<4;j++){
            if(mark==marks[j]){
                cards[j][num-1]=true;
                break;
            }
        }
    }
    for(i=0;i<4;i++){
        for(j=0;j<13;j++){
            if(!cards[i][j]){
                printf("%c %d\n", marks[i], j+1);
            }
        }
    }
    


Compiler output:
main.c: In function 'main':
main.c:28:5: error: expected declaration or statement at end of input
   28 |     }
      |     ^
Language: C

#include <stdio.h>
#include <stdbool.h>
/*
int main(int argc, char const *argv[])
{
	int cards[4][13];
	int i, j;
	int n;

	scanf("%d", &n);
	for(i = 0; i < n; i++) {
		scanf("%d", &cards[i][j]);
	}

	printf("%d\n", cards[i][j]);

	return 0;
}
*/

{
	int i, j, n;
	char mark;
	char marks[4] = {'S', 'H', 'C', 'D'};
	int num;
	bool cards[4][13]={false};	//最初はすべてのカードがfalse

	scanf("%d", &n);	//入力数を読み取る
	for (i=0;i<n;i++){	//入力数の分だけ
		scanf("%c %d", &mark, &num); //柄　数字　を読み取る
		for (j=0;j<4;j++) {		//柄の判定
			if(mark==marks[j]) {	//柄がある
				cards[j][num-1]=true;	//そのときの柄と数字を持つカードはtrueとなる
				break;
			}
		}

	}
	for(i=0;i<4;i++) {			//出力は柄の降べき
		for(j=0;j<13;j++) {		
			if(!cards[i][j]) {	//cards[][]がfalse
				printf("%c %d\n", marks[i], j+1);	//cards[][]の内容を表示
			}
		}
	}
	return 0;
}


Compiler output:
main.c:21:1: error: expected identifier or '(' before '{' token
   21 | {
      | ^
Language: C

#include <stdio.h>
#include <stdbool.h>

{
	int i, j, n;
	char mark;
	char marks[4] = {'S', 'H', 'C', 'D'};
	int num;
	bool cards[4][13]={false};	

	scanf("%d", &n);
	for (i=0;i<n;i++){	
		scanf("%c %d", &mark, &num); 
		for (j=0;j<4;j++) {		
			if(mark==marks[j]) {	
				cards[j][num-1]=true;	
				break;
			}
		}

	}
	for(i=0;i<4;i++) {	
		for(j=0;j<13;j++) {		
			if(!cards[i][j]) {
				printf("%c %d\n", marks[i], j+1);
			}
		}
	}
	return 0;
}


Compiler output:
main.c:4:1: error: expected identifier or '(' before '{' token
    4 | {
      | ^
Language: C

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




Compiler output:
main.c: In function 'main':
main.c:25:36: error: 'crads' undeclared (first use in this function); did you mean 'cards'?
   25 |                         if(i==2 && crads[i][j]==0){
      |                                    ^~~~~
      |                                    cards
main.c:25:36: note: each undeclared identifier is reported only once for each function it appears in
main.c:36:1: error: expected declaration or statement at end of input
   36 | }
      | ^
Language: C

#include <stdio.h> 
 
  int main(){ 
      int i, j, n; 
    char mark; 
     char marks[4]={'S', 'H', 'C', 'D'}; 
     int num; 
     bool cards[4][13]={false}; 
 
 
     scanf("%d ", &n); 
     for(i=0;i<n;i++){ 
         scanf("%c %d ", &mark, &num); 
         for(j=0;j<4;j++){ 
             if(mark==marks[j]){ 
                 cards[j][num-1]=true; 
                 break; 
             } 
         } 
     } 
     for(i=0;i<4;i++){ 
         for(j=0;j<13;j++){ 
             if(!cards[i][j]){ 
                 printf("%c %d\n", marks[i], j+1); 
             } 
         } 
     } 
     return 0; 



Compiler output:
main.c: In function 'main':
main.c:8:6: error: unknown type name 'bool'
    8 |      bool cards[4][13]={false};
      |      ^~~~
main.c:2:1: note: 'bool' 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:8:25: error: 'false' undeclared (first use in this function)
    8 |      bool cards[4][13]={false};
      |                         ^~~~~
main.c:8:25: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:8:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:34: error: 'true' undeclared (first use in this function)
   16 |                  cards[j][num-1]=true;
      |                                  ^~~~
main.c:16:34: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:28:6: error: expected declaration or statement at end of input
   28 |      return 0;
      |      ^~~~~~
Language: C

#include <stdio.h>

int main(void){
  int n;
  int i, j;
  int card[4][13];
  int rank;
  char suite[2];

  for (i = 0; i < 4; i++){
    for (j = 0; j < 13; j++){
      card[i][j] = 0;
    }
  }

  scanf("%d\n" &n);

  for (i = 0; i < n; i++){
    scanf("%s %d\n", suite, &rank);
    if      (suite[0] == 'S') card[0][rank] = 1;
    else if (suite[0] == 'H') card[1][rank] = 1;
    else if (suite[0] == 'C') card[2][rank] = 1;
    else if (suite[0] == 'D') card[3][rank] = 1;
  }

  for (i = 0; i < 4; i++){
    for (j = 0; j < 13; j++){
      if      (card[0][j] == 0) printf("S %d\n", j);
      else if (card[1][j] == 0) printf("H %d\n", j);
      else if (card[2][j] == 0) printf("C %d\n", j);
      else if (card[3][j] == 0) printf("D %d\n", j);
    }
  }

  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:16:16: error: invalid operands to binary & (have 'char *' and 'int')
   16 |   scanf("%d\n" &n);
      |         ~~~~~~ ^
      |         |
      |         char *
Language: C

#include <stdio.h>

int main(void){
  int n;
  int i, j;
  int card[4][13];
  int rank;
  char suite[2];

  for (i = 0; i < 4; i++){
    for (j = 0; j < 13; j++){
      card[i][j] = 0;
    }
  }

  scanf("%d\n", &n);

  for (i = 0; i < n; i++){
    scanf("%s %d", suite, &rank);
    if      (suite[0] == 'S') card[0][rank] = 1;
    else if (suite[0] == 'H') card[1][rank] = 1;
    else if (suite[0] == 'C') card[2][rank] = 1;
    else if (suite[0] == 'D') card[3][rank] = 1;
  }

  for (i = 0; i < 4; i++){
    for (j = 0; j < 13; j++){
      if      (card[0][j] == 0 && i = 0) printf("S %d\n", j+1);
      else if (card[1][j] == 0 && i = 1) printf("H %d\n", j+1);
      else if (card[2][j] == 0 && i = 2) printf("C %d\n", j+1);
      else if (card[3][j] == 0 && i = 3) printf("D %d\n", j+1);
    }
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:28:37: error: lvalue required as left operand of assignment
   28 |       if      (card[0][j] == 0 && i = 0) printf("S %d\n", j+1);
      |                                     ^
main.c:29:37: error: lvalue required as left operand of assignment
   29 |       else if (card[1][j] == 0 && i = 1) printf("H %d\n", j+1);
      |                                     ^
main.c:30:37: error: lvalue required as left operand of assignment
   30 |       else if (card[2][j] == 0 && i = 2) printf("C %d\n", j+1);
      |                                     ^
main.c:31:37: error: lvalue required as left operand of assignment
   31 |       else if (card[3][j] == 0 && i = 3) printf("D %d\n", j+1);
      |                                     ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:13:7: error: stray '\343' in program
   13 |    int<U+3000>num;
      |       ^~~~~~~~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:13:7: error: stray '\343' in program
   13 |    int<U+3000>num;
      |       ^~~~~~~~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:13:7: error: stray '\343' in program
   13 |    int<U+3000>num;
      |       ^~~~~~~~
Language: C

#include<stdio.h>
 
int main()
{
  int t[4][14];
  int n, i,j,c;
  char m, d;
  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][j] != 1){
      printf("S %d\n", j);
    }
  }
 
 for(j=1; j < 14; j++){
    if(t[1][j] != 1){
      printf("H %d\n", j);
    }
  }
 
 for(j=1; j < 14; j++){
    if(t[2][j] != 1){
      printf("C %d\n", j);
    }
  }
 
 for(j=1; j < 14; j++){
    if(t[3][j] != 1){
      printf("D %d\n", j);
    }
  }
 return 0;



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

int cards[128][14] = {{0}};
  int i, N;
  scanf("%d", &N);
  for(i = 0; i < N; i++) {
    char c; int cn;
    scanf("%c", &c); 
    scanf("%c %d", &c, &cn);
    
    cards[c][cn] = 1;
  }
  /* 'S'の不足カードを表示 */
  for(i = 1; i <= 13; i++) {
    /* 文字は'S'のように ' 'で囲む */
    if(cards['S'][i] == 0) printf("S %d\n", i);
    else if(cards['H'][i] == 0) printf("H %d\n", i);
    else if(cards['C'][i] == 0) printf("C %d\n", i);
    else if(cards['D'][i] == 0) printf("D %d\n", i);
  }
  return 0;

}


Compiler output:
main.c:3:9: error: expected declaration specifiers or '...' before string constant
    3 |   scanf("%d", &N);
      |         ^~~~
main.c:3:15: error: expected declaration specifiers or '...' before '&' token
    3 |   scanf("%d", &N);
      |               ^
main.c:4:3: error: expected identifier or '(' before 'for'
    4 |   for(i = 0; i < N; i++) {
      |   ^~~
main.c:4:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    4 |   for(i = 0; i < N; i++) {
      |                ^
main.c:4:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    4 |   for(i = 0; i < N; i++) {
      |                      ^~
main.c:12:3: error: expected identifier or '(' before 'for'
   12 |   for(i = 1; i <= 13; i++) {
      |   ^~~
main.c:12:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   12 |   for(i = 1; i <= 13; i++) {
      |                ^~
main.c:12:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   12 |   for(i = 1; i <= 13; i++) {
      |                        ^~
main.c:19:3: error: expected identifier or '(' before 'return'
   19 |   return 0;
      |   ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
	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:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'short'
    6 |         short card[4][14];
      |         ^~~~~
main.c:11:22: error: 'rank' undeclared (first use in this function)
   11 |                 for (rank = 1; rank <= 13; rank++) card[id][rank] = 1;
      |                      ^~~~
main.c:11:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:52: error: 'card' undeclared (first use in this function)
   11 |                 for (rank = 1; rank <= 13; rank++) card[id][rank] = 1;
      |                                                    ^~~~
main.c:13:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   13 |         gets(buf);
      |         ^~~~
      |         fgets
main.c:14:13: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   14 |         n = atoi(buf);
      |             ^~~~
main.c:18:24: error: implicit declaration of function 'isspace' [-Wimplicit-function-declaration]
   18 |                 while (isspace(*p)) p++;
      |                        ^~~~~~~
main.c:2:1: note: include '<ctype.h>' or provide a declaration of 'isspace'
    1 | #include <stdio.h>
  +++ |+#include <ctype.h>
    2 |
Language: C

#include <stdio.h>

int main(void)
{
	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:13:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   13 |         gets(buf);
      |         ^~~~
      |         fgets
main.c:14:13: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   14 |         n = atoi(buf);
      |             ^~~~
main.c:18:24: error: implicit declaration of function 'isspace' [-Wimplicit-function-declaration]
   18 |                 while (isspace(*p)) p++;
      |                        ^~~~~~~
main.c:2:1: note: include '<ctype.h>' or provide a declaration of 'isspace'
    1 | #include <stdio.h>
  +++ |+#include <ctype.h>
    2 |
Language: C

#include <stdio.h>

int main(void){
    char tem[5]={"SHDC"};
    int tranp [4][13]; // 0S 1H 2D 3C
    int n,i,j;

    for(i=0;i<4;i++){
     for(j=0;j<13;j++){
      tranp[i][j] = 0;
     }
    }

    scanf("%d",&n);

    for(i=0;i<n;i++){
     char mark;
     int number;
     scanf("%c %d",&mark,&number);
     if( mark =='S')
        tranp[0][number-1] = 1;
     else if( mark =='H')
        tranp[1][number-1] = 1;
     else if( mark =='D')
        tranp[2][number-1] = 1;
     else( mark =='C')
        tranp[3][number-1] = 1;
     }
       
     for(i=0;i<4;i++){
     for(j=0;j<13;j++){
      if(tranp[i][j] == 0)
        printf("%c %d",tem[i],j+1); 
     }
    }
   return 0;
}

    

Compiler output:
main.c: In function 'main':
main.c:26:23: error: expected ';' before 'tranp'
   26 |      else( mark =='C')
      |                       ^
      |                       ;
   27 |         tranp[3][number-1] = 1;
      |         ~~~~~
Language: C

#include <stdio.h>

int main(void){
    char tem[5]={"SHDC"};
    int tranp [4][13]; // 0S 1H 2D 3C
    int n,i,j;

    for(i=0;i<4;i++){
     for(j=0;j<13;j++){
      tranp[i][j] = 0;
     }
    }

    scanf("%d",&n);

    for(i=0;i<n;i++){
     char mark;
     int number;
     scanf("%c %d",&mark,&number);
     if( mark =='S')
        tranp[0][number-1] = 1;
     else if( mark =='H')
        tranp[1][number-1] = 1;
     else if( mark =='D')
        tranp[2][number-1] = 1;
     else( mark =='C')
        tranp[3][number-1] = 1;
     }
       
     for(i=0;i<4;i++){
     for(j=0;j<13;j++){
      if( tranp[i][j] == 0){
        printf("%c %d",tem[i],j+1);
      }
     }
    }
   return 0;
}

    

Compiler output:
main.c: In function 'main':
main.c:26:23: error: expected ';' before 'tranp'
   26 |      else( mark =='C')
      |                       ^
      |                       ;
   27 |         tranp[3][number-1] = 1;
      |         ~~~~~
Language: C

#include <stdio.h>
#include <string.h>

int main(void){
	int n,num,i,j;
	char mark[256];
	bool cards[4][13];

	for(i = 0;i < 4;i++){
		for(j = 0;j < 13;j++){
			cards[i][j] = false;
		}
	}

	scanf("%d", &n);

	if(n > 52){
		return 0;
	}

	for(i = 0;i < n;i++){
		scanf("%s %d", mark, &num);
		if(num >= 1 && num <= 13){
			if(strcmp(mark,"S") == 0){
				cards[0][num - 1] = true;
			}else if(strcmp(mark,"H") == 0){
				cards[1][num - 1] = true;
			}else if(strcmp(mark,"C") == 0){
				cards[2][num - 1] = true;
			}else if(strcmp(mark,"D") == 0){
				cards[3][num - 1] = true;
			}else{
				return 0;
			}
		}else{
			return 0;
		}
	}

	for(i = 0;i < 4;i++){
		for(j = 0;j < 13;j++){
			if(cards[i][j] == false){
				switch(i){
					case 0:
						printf("S");
						break;
					case 1:
						printf("H");
						break;
					case 2:
						printf("C");
						break;
					case 3:
						printf("D");
						break;
					default:
						break;
				}
				printf(" %d\n", j + 1);
			}
		}
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool cards[4][13];
      |         ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <string.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:11:39: error: 'false' undeclared (first use in this function)
   11 |                         cards[i][j] = false;
      |                                       ^~~~~
main.c:11:39: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:11:39: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:53: error: 'true' undeclared (first use in this function)
   25 |                                 cards[0][num - 1] = true;
      |                                                     ^~~~
main.c:25:53: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include<stdio.h>
 
int main(int argc, char* argv[])
{
  char r[]={"SHCD"}, a[52];
  int n, b[52], c[4][13];
  int i, j, k;
 
  scanf("%d", &n);
  for(i = 0; i < n; i++){
    scanf("%c %d", &a[i], &b[i]);
  }
 
  for(i = 0; i < 4; i++){
    for(j = 0; j < 13; j++){
      c[i][j] = 0;
    }
  }
 
  for(i = 0; i < n; i++){
    for(j = 0; r[j] != '\0'; j++){
      if(a[i] == r[j]){
        k = j;
        break;
      }
    }
    c[k][b[i]-1] = 1;
  }
 
  for(i = 0; i < 4; i++){
    for(j = 0; j < 13; j++){
      if(c[i][j] == 0){
        printf("%c %d\n", r[i], j+1);
      }
    }
  }
  return(0);

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

#include <stdio.h>
#include <string.h>

int main(){
int n;
int s[13];
int h[13];
int c[13];
int d[13];
int i;
char mark;
int  rank;

for (i=0; i<52; i++){
        s[i]=0;
        h[i]=0;
        c[i]=0;
        d[i]=0;
}

scanf("%d",n);

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

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

Compiler output:
main.c:44:1: error: expected identifier or '(' before '~' token
   44 | ~
      | ^
Language: C

#include <stdio.h>
#include <string.h>

int main(){
int n, i, rank, j ;
bool card[4][13] ;
char mark;

/* Read # of cards */
 scanf("%d", &n);

/* Read cards */
for (i=0; i< n; i++){
        scanf (" %c %d", &mark, &rank);
        j =  (mark == 'S')*1+(mark == 'H')*2+(mark =='C')*3+(mark =='D')*4 ;
        card[j-1][rank-1]=1;
}

for (i=0; i<4; i++){
        switch (i) {
                case 0: mark ='S';
                case 1: mark ='H';
                case 2: mark ='C';
                case 3: mark ='D';
                }
for (j=0; j<13; j++){
        if (card[i][j] == 1) printf("%c %d\n", mark, j+1);
                        }
                        }
return 0;}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: unknown type name 'bool'
    6 | bool card[4][13] ;
      | ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <string.h>
  +++ |+#include <stdbool.h>
    3 |
Language: C

#include <stdio.h>
#include <string.h>

int main(){
int n, i, rank, j ;
bool card[4][13] ;
char mark;

 scanf("%d", &n);

for (i=0; i< n; i++){
        scanf (" %c %d", &mark, &rank);
        j =  (mark == 'S')*1+(mark == 'H')*2+(mark =='C')*3+(mark =='D')*4 ;
        card[j-1][rank-1]=1;
}

for (i=0; i<4; i++){
        switch (i) {
                case 0: mark ='S';
                case 1: mark ='H';
                case 2: mark ='C';
                case 3: mark ='D';
                }
for (j=0; j<13; j++){
        if (card[i][j] == 1) printf("%c %d\n", mark, j+1);
                        }
                        }
return 0;}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: unknown type name 'bool'
    6 | bool card[4][13] ;
      | ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <string.h>
  +++ |+#include <stdbool.h>
    3 |