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

#include <stdio.h>
int main(void){
    int n,i;
    scanf("%d",&n);
    int a[n];
    for(i=0; i<n; i++)
        scanf("%d",&a[i]);
    for(i=n-1; i>=0; i--){
        if(i!=n-1)
           putchar(' ');
        printf("%d",a[i]);
    putchar('\n');
    return 0;
}

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

#include <stdio.h>

int main(void){
        int i, n , a[1000];

        scanf("%d", &n);
        scanf("%s", a);

        for(i=0; i<n; i++){
                if(i)   printf(" ");
                printf("%d", a[n-i-1]);
        }
????????????printf("\n");
        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:1: error: expected expression before '?' token
   13 | ????????????printf("\n");
      | ^
Language: C

#include<stdio.h>
  2 int main(void){
  3     int n,i;
  4     scanf("%d",&n);
  5     int a[n];
  6     for(i=0; i<n; i++){
  7         scanf(" %d",&a[n-i]);
  8     }
  9     for(i=0; i<n; i++){
 10         printf("%d ",&a[i]);
 11     }
 12     return 0;
 13 }

Compiler output:
main.c:2:3: error: expected identifier or '(' before numeric constant
    2 |   2 int main(void){
      |   ^
Language: C

#include<stdio.h>
int main(void){
int n,i,j,a[100],b[100];
scanf("%d",&n);
for(i=0;i < n;i++){
scanf("%d ",&a[i]);
}
for(j=0;j < n;j++){
b[j]=a[n-j];
printf("%d",b[j]);
if (j != n-1){
printf(" ");
}
}
}
}
printf("\n");
return 0;
}

Compiler output:
main.c:16:1: error: expected identifier or '(' before '}' token
   16 | }
      | ^
main.c:17:8: error: expected declaration specifiers or '...' before string constant
   17 | printf("\n");
      |        ^~~~
main.c:18:1: error: expected identifier or '(' before 'return'
   18 | return 0;
      | ^~~~~~
main.c:19:1: error: expected identifier or '(' before '}' token
   19 | }
      | ^
Language: C

#include<stdio.h>

int a[100]

int main(void){
    int i,n;

    scanf("%d",&n);

    for(i = 0;i < n;i++)
        scanf("%d",&a[i]);

    for(i = n - 1;i >= 0;i--){
        printf("%d",a[i]);
        if(i > 0)
        printf(" ");
    }
    printf("\n");
    return 0;
}

Compiler output:
main.c:3:11: error: expected ';' before 'int'
    3 | int a[100]
      |           ^
      |           ;
    4 | 
    5 | int main(void){
      | ~~~        
main.c: In function 'main':
main.c:11:21: error: 'a' undeclared (first use in this function)
   11 |         scanf("%d",&a[i]);
      |                     ^
main.c:11:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

n;
main(a[100]) {
    if(!i)scanf("%d",n);
    scanf("%d",&a[i]);
    if(i<n)main(a[i++]);
    printf("%d ",a[i--]);
}
 

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:2:6: error: unknown type name 'a'
    2 | main(a[100]) {
      |      ^
Language: C

n;
main(int a[100]) {
    if(!i)scanf("%d",n);
    scanf("%d",&a[i]);
    if(i<n)main(a[i++]);
    printf("%d ",a[i--]);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(int a[100]) {
      | ^~~~
main.c: In function 'main':
main.c:3:9: error: 'i' undeclared (first use in this function)
    3 |     if(!i)scanf("%d",n);
      |         ^
main.c:3:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |     if(!i)scanf("%d",n);
      |           ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | n;
main.c:3:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |     if(!i)scanf("%d",n);
      |           ^~~~~
main.c:3:11: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |     scanf("%d",&a[i]);
      |     ^~~~~
main.c:4:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |     printf("%d ",a[i--]);
      |     ^~~~~~
main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

i,n;
main(int a[100],i) {
    if(!i)scanf("%d",n);
    scanf("%d",&a[i++]);
    if(i<n)main(a[i],i);
    printf("%d ",a[i--]);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | i,n;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
    1 | i,n;
      |   ^
main.c:2:17: error: expected declaration specifiers or '...' before 'i'
    2 | main(int a[100],i) {
      |                 ^
Language: C

i,n;
main(int a[100] int i) {
    if(!i)scanf("%d",n);
    scanf("%d",&a[i++]);
    if(i<n)main(a[i],i);
    printf("%d ",a[i--]);
}
 

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | i,n;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
    1 | i,n;
      |   ^
main.c:2:17: error: expected ';', ',' or ')' before 'int'
    2 | main(int a[100] int i) {
      |                 ^~~
Language: C

n;
main(int a[100];int i;) {
    if(!i)scanf("%d",n);
    scanf("%d",&a[i++]);
    if(i<n)main(a[i],i);
    printf("%d ",a[i--]);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(int a[100];int i;) {
      | ^~~~
main.c: In function 'main':
main.c:3:9: error: 'i' undeclared (first use in this function)
    3 |     if(!i)scanf("%d",n);
      |         ^
main.c:3:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |     if(!i)scanf("%d",n);
      |           ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | n;
main.c:3:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |     if(!i)scanf("%d",n);
      |           ^~~~~
main.c:3:11: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |     scanf("%d",&a[i++]);
      |     ^~~~~
main.c:4:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:17: error: 'a' undeclared (first use in this function)
    4 |     scanf("%d",&a[i++]);
      |                 ^
main.c:6:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |     printf("%d ",a[i--]);
      |     ^~~~~~
main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
int main(void){
	int n,i;
	scanf("%d\n",&n);
	int a[n];
	for(i=0;i<n;i++){
		scanf("%d ",a[i]);
	}
	printf("\n");
	for(i = (n-1); i >=0){
		printf("%d ",a[i]);
		i--;
	}
	printf("\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:29: error: expected ';' before ')' token
   10 |         for(i = (n-1); i >=0){
      |                             ^
      |                             ;
Language: C

#include<stdio.h>
int main(void){
	int n,i,tmp;
	int a[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d ",&a[i]);
	}
	for(i = 0; i<n;i++){
		tmp = a[i];
		a[i] = a[n-i];
		a[n-i] = tmp;
	}
	i=0;
	while(1){
		if( i ==(n-1){
			printf("%d",a[i]);
			break;
		}
		else{
			printf("%d ",a[i]);
		}
	}
	printf("\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:30: error: expected ')' before '{' token
   16 |                 if( i ==(n-1){
      |                   ~          ^
      |                              )
main.c:23:9: error: expected expression before '}' token
   23 |         }
      |         ^
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
 int n,i;
 scanf("%d",&n);
 int *p;
 p=malloc((n+1)*sizeof(int));
 for(i=0;i<n;i++){
  scanf("%d",p[i]);}
 for(i=1;i<n;i++){
  printf("%d ",*p[n-i]);}
 printf("%d\n",*p[0]);
 return 0;}

Compiler output:
main.c: In function 'main':
main.c:12:16: error: invalid type argument of unary '*' (have 'int')
   12 |   printf("%d ",*p[n-i]);}
      |                ^~~~~~~
main.c:13:16: error: invalid type argument of unary '*' (have 'int')
   13 |  printf("%d\n",*p[0]);
      |                ^~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
 int n,i;
 scanf("%d",&n);
 int*???p;
 p=malloc((n+1)*sizeof(int));
 for(i=0;i<n;i++){
  scanf("%d",p[i]);}
 for(i=1;i<n;i++){
  printf("%d ",*p[n-i]);}
 printf("%d\n",*p[0]);
 return 0;}

Compiler output:
main.c: In function 'main':
main.c:7:6: error: expected identifier or '(' before '?' token
    7 |  int*???p;
      |      ^
main.c:8:2: error: 'p' undeclared (first use in this function)
    8 |  p=malloc((n+1)*sizeof(int));
      |  ^
main.c:8:2: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
 int n,i;
 scanf("%d",&n);
 int* p;
 p=malloc((n+1)*sizeof(int));
 for(i=0;i<n;i++){
  scanf("%d",p[i]);}
 for(i=1;i<n;i++){
  printf("%d ",*p[n-i]);}
 printf("%d\n",*p[0]);
 return 0;}

Compiler output:
main.c: In function 'main':
main.c:12:16: error: invalid type argument of unary '*' (have 'int')
   12 |   printf("%d ",*p[n-i]);}
      |                ^~~~~~~
main.c:13:16: error: invalid type argument of unary '*' (have 'int')
   13 |  printf("%d\n",*p[0]);
      |                ^~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
 int n,i;
 scanf("%d",&n);
 int* p;
 p=malloc((n+1)*sizeof(int));
 for(i=0;i<n;i++){
  scanf("%d",p[i]);}
 for(i=1;i<n;i++){
  printf("%d ",p[n-i]);}
 printf("%d\n",p[0]);
 free p;
 return 0;}

Compiler output:
main.c: In function 'main':
main.c:14:6: error: expected ';' before 'p'
   14 |  free p;
      |      ^~
      |      ;
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
 int n,i;
 scanf("%d",&n);
 int* p;
 p=malloc((n+1)*sizeof(int));
 for(i=0;i<n;i++){
  scanf("%d",p[i]);}
 for(i=1;i<n;i++){
  printf("%d ",*p[n-i]);}
 printf("%d\n",*p[0]);
 free(p);
 return 0;}

Compiler output:
main.c: In function 'main':
main.c:12:16: error: invalid type argument of unary '*' (have 'int')
   12 |   printf("%d ",*p[n-i]);}
      |                ^~~~~~~
main.c:13:16: error: invalid type argument of unary '*' (have 'int')
   13 |  printf("%d\n",*p[0]);
      |                ^~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
 int n,i;
 scanf("%d",&n);
 int* p;
 p=malloc((n+1)*sizeof(int));
 for(i=0;i<n;i++){
  scanf("%d",p+i]);}
 for(i=1;i<n;i++){
  printf("%d ",*(p+n-i)]);}
 printf("%d\n",*p);
 free(p);
 return 0;}

Compiler output:
main.c: In function 'main':
main.c:10:17: error: expected ')' before ']' token
   10 |   scanf("%d",p+i]);}
      |        ~        ^
      |                 )
main.c:10:17: error: expected ';' before ']' token
   10 |   scanf("%d",p+i]);}
      |                 ^
      |                 ;
main.c:10:17: error: expected statement before ']' token
main.c:10:18: error: expected statement before ')' token
   10 |   scanf("%d",p+i]);}
      |                  ^
main.c:12:24: error: expected ')' before ']' token
   12 |   printf("%d ",*(p+n-i)]);}
      |         ~              ^
      |                        )
main.c:12:24: error: expected ';' before ']' token
   12 |   printf("%d ",*(p+n-i)]);}
      |                        ^
      |                        ;
main.c:12:24: error: expected statement before ']' token
main.c:12:25: error: expected statement before ')' token
   12 |   printf("%d ",*(p+n-i)]);}
      |                         ^
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
 int n,i;
 scanf("%d",&n);
 int* p;
 p=malloc((n+1)*sizeof(int));
 for(i=0;i<n;i++){
  scanf("%d",(p+i)]);}
 for(i=1;i<n;i++){
  printf("%d ",*(p+n-i)]);}
 printf("%d\n",*p);
 free(p);
 return 0;}

Compiler output:
main.c: In function 'main':
main.c:10:19: error: expected ')' before ']' token
   10 |   scanf("%d",(p+i)]);}
      |        ~          ^
      |                   )
main.c:10:19: error: expected ';' before ']' token
   10 |   scanf("%d",(p+i)]);}
      |                   ^
      |                   ;
main.c:10:19: error: expected statement before ']' token
main.c:10:20: error: expected statement before ')' token
   10 |   scanf("%d",(p+i)]);}
      |                    ^
main.c:12:24: error: expected ')' before ']' token
   12 |   printf("%d ",*(p+n-i)]);}
      |         ~              ^
      |                        )
main.c:12:24: error: expected ';' before ']' token
   12 |   printf("%d ",*(p+n-i)]);}
      |                        ^
      |                        ;
main.c:12:24: error: expected statement before ']' token
main.c:12:25: error: expected statement before ')' token
   12 |   printf("%d ",*(p+n-i)]);}
      |                         ^
Language: C

nclude <stdio.h>
int main(void){
	int n=0,a[100]={0},i=0,z=0;
	scanf("%d\n",&n);
	while(1){
		if(i>=n)break;
	scanf("%d",&a[i]);
	i++;
	}
	i=0;
	while(1){
		if(i>(n/2)-1)break;
		z=a[i];
		a[i]=a[n-i-1];
		a[n-i-1]=z;
		z=0;
		i++;
	}
	i=0;
	while(1){
		if(i>=n)break;
		printf("%d",a[i]);
		printf(" ");
		i++;
	}
	printf("\n");
	return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | nclude <stdio.h>
      |        ^
Language: C

#include <stdio.h>
int main()
{
 int a[100];
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {
  scanf("%d",&a[i]);
 }
 for(i=n-1;i>0;i--)
 {
  printf("%d",a[i]);
 }
}

Compiler output:
main.c: In function 'main':
main.c:5:14: error: 'n' undeclared (first use in this function)
    5 |  scanf("%d",&n);
      |              ^
main.c:5:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:6: error: 'i' undeclared (first use in this function)
    6 |  for(i=0;i<n;i++)
      |      ^
Language: C

#include <stdio.h>
int main()
{
 int a[100];
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {
  scanf("%d",&a[i]);
 }
 for(i=n-1;i>0;i--)
 {
  printf("%d",a[i]);
 }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:14: error: 'n' undeclared (first use in this function)
    5 |  scanf("%d",&n);
      |              ^
main.c:5:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:6: error: 'i' undeclared (first use in this function)
    6 |  for(i=0;i<n;i++)
      |      ^
Language: C

#include <stdio.h>
int main()
{
 int a[100],n;
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {
  scanf("%d",&a[i]);
 }
 for(i=n-1;i>0;i--)
 {
  printf("%d",a[i]);
 }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:6: error: 'i' undeclared (first use in this function)
    6 |  for(i=0;i<n;i++)
      |      ^
main.c:6:6: 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 = 0;<font></font>
  int a[100];<font></font>
  int i;<font></font>
<font></font>
  scanf("%d", &n);<font></font>
<font></font>
  for(i = 0; i < n; i++)<font></font>
    scanf("%d", &a[i]);<font></font>
<font></font>
  for(i = n - 1; i > 0; i--)<font></font>
    printf("%d ", a[i]);<font></font>
<font></font>
  printf("%d\n", a[i]);<font></font>
<font></font>
  return 0;<font></font>
}<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:20:2: error: expected identifier or '(' before '<' token
   20 | }<font></font>
      |  ^
Language: C

#include <stdio.h>

int main(void)
{
	int n,i,j,min;
	int a[100];
	
	printf("??´??°?????\????????????????????????\n");
	scanf("%d",&n);
	
	for(i=0 ;i<n; i++ ){                
		scanf("%d",&a[i]);
	}
	
	for(i=n-1 ;i>=0 ;i-- ){
		printf("%d ",a[i]);
	}	

    return0;
}

Compiler output:
main.c: In function 'main':
main.c:19:5: error: 'return0' undeclared (first use in this function)
   19 |     return0;
      |     ^~~~~~~
main.c:19:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void)
{
	int n,i,j,min;
	int a[100];
	
	printf("??´??°?????\????????????????????????\n");//n?±???????
	scanf("%d",&n);
	
	for(i=0 ;i<n; i++ ){                 //a[i]?±???????a
		scanf("%d",&a[i]);
	}
	
	for(i=n-1 ;i>=0 ;i-- ){
		printf("%d ",a[i]);
	}	
      return0;
}

Compiler output:
main.c: In function 'main':
main.c:18:7: error: 'return0' undeclared (first use in this function)
   18 |       return0;
      |       ^~~~~~~
main.c:18:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void){
	int i,n;
	int array[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&array[i]);
	}
	for(i=n-1;i>=0;i--){
		printf("%d ",array[i]);
		if(i==0){
			printf("\n");
	}
	
	return 0;
}

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

#include <stdio.h>

int main(void)
{
	int n,data[n];
	int i,x;
    scanf("%d",&n);
	
	for (i = 0;i < n;i++){
        scanf(" %d",&data[i]);

	}


	}
	for (x = 0;x < n;x++){
		printf(" %d",data[i]);
		i--;
	}

	printf("\n");

	return 0;
}

Compiler output:
main.c:16:9: error: expected identifier or '(' before 'for'
   16 |         for (x = 0;x < n;x++){
      |         ^~~
main.c:16:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   16 |         for (x = 0;x < n;x++){
      |                      ^
main.c:16:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   16 |         for (x = 0;x < n;x++){
      |                           ^~
main.c:21:16: error: expected declaration specifiers or '...' before string constant
   21 |         printf("\n");
      |                ^~~~
main.c:23:9: error: expected identifier or '(' before 'return'
   23 |         return 0;
      |         ^~~~~~
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
	
	
	int n;
	int a;
	
	
	scanf("%d",&i);
	
	int data[n];
	
	a=i;
	
	
	for(n=1;n<=a;n++){
		scanf("%d",&data[n;
	}
		
	for(n=a;n>=1;n--){
		printf("%d",data[n]);
		
		if(n!=1){
			printf(" ");
		}
	}
	
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:21: error: 'i' undeclared (first use in this function)
    9 |         scanf("%d",&i);
      |                     ^
main.c:9:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:35: error: expected ']' before ';' token
   17 |                 scanf("%d",&data[n;
      |                                   ^
      |                                   ]
main.c:17:36: error: expected ')' before '}' token
   17 |                 scanf("%d",&data[n;
      |                      ~             ^
      |                                    )
   18 |         }
      |         ~                           
main.c:17:36: error: expected ';' before '}' token
   17 |                 scanf("%d",&data[n;
      |                                    ^
      |                                    ;
   18 |         }
      |         ~
Language: C

#include<stdio.h>
int main(void){
	
	
	int n;
	int a;
	
	
	scanf("%d",&n);
	
	int data[n];
	
	a=n;
	
	
	for(n=1;n<=a;n++){
		scanf("%d",&data[n;
	}
		
	for(n=a;n>=1;n--){
		printf("%d",data[n]);
		
		if(n!=1){
			printf(" ");
		}
	}
	
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:35: error: expected ']' before ';' token
   17 |                 scanf("%d",&data[n;
      |                                   ^
      |                                   ]
main.c:17:36: error: expected ')' before '}' token
   17 |                 scanf("%d",&data[n;
      |                      ~             ^
      |                                    )
   18 |         }
      |         ~                           
main.c:17:36: error: expected ';' before '}' token
   17 |                 scanf("%d",&data[n;
      |                                    ^
      |                                    ;
   18 |         }
      |         ~
Language: C

#include<stdio.h>
int main(void){
	
	
	int n;
	int a;
	
	
	scanf("%d",&n);
	
	int data[n];
	
	a=n;
	
	
	for(n=1;n<=a;n++){
		scanf("%d",&data[n];)
	}
		
	for(n=a;n>=1;n--){
		printf("%d",data[n]);
		
		if(n!=1){
			printf(" ");
		}
	}
	
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:36: error: expected ')' before ';' token
   17 |                 scanf("%d",&data[n];)
      |                      ~             ^
      |                                    )
main.c:17:38: error: expected ';' before '}' token
   17 |                 scanf("%d",&data[n];)
      |                                      ^
      |                                      ;
   18 |         }
      |         ~
Language: C

#include<stdio.h>
int main(void){
	int n,i;
	int a[1000];
	
	scanf("%d",&n);
	for(i = 0;i < n;i++){
		scanf("%d",&a[i]);
	}
	for(i = n-1;i >= 0;i--){
		if(i){
			printf("%d ",a[i]);
		}else{
			printf("%d",a[i]);
		}
	return 0;
}

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

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

int main(void) {
	int num;
	char tmp[100];
	
	//??\????????°?????\????????????
	fgets(tmp, sizeof(tmp), stdin);
	num = atoi(tmp);
	
	char numbers[1000];
	//
	fgets(numbers, sizeof(numbers), stdin);
	int i;
	for (i = num; i > 0;i--) {
		printf("%c",num[i]);
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:32: error: subscripted value is neither array nor pointer nor vector
   19 |                 printf("%c",num[i]);
      |                                ^
Language: C

#include<stdio.h>
int main(void){
    int a,i,b[100];
    scanf("%d",&a);
    for(i=0;i<a;i++){
        scanf("%d",&b[i]);
    }
    for(i=a-1;i>=0;i--){
        printf("%d ",b[i]);
       
        }
    }
    printf("\n");
    return 0;
}

Compiler output:
main.c:13:12: error: expected declaration specifiers or '...' before string constant
   13 |     printf("\n");
      |            ^~~~
main.c:14:5: error: expected identifier or '(' before 'return'
   14 |     return 0;
      |     ^~~~~~
main.c:15:1: error: expected identifier or '(' before '}' token
   15 | }
      | ^
Language: C

#include <stdio.h>
 
main() {
  int array[100];
  int i, n;
   
  scanf("%d", &n);
   
   
  for (i = 0; i < n; i++) {
    scanf("%d", &array[i]);
  }
  for (i = n-1; i >= 0; i--) {
    printf("%d", array[i]);
    if (i != 0) {
      printf(" ");
    }
     
  }
  printf("\n");
  return 0; 

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main() {
      | ^~~~
main.c: In function 'main':
main.c:21:3: error: expected declaration or statement at end of input
   21 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>
int main()
{
	int i, n, v[100;

	scanf("%d", &n);
	for (i = 0; i < n; i++)
	{
		scanf("%d", v[i]);
	}
	for (i = n - 1; i >= 0; i--)
	{
		printf("%d", v[i]);
		if (i != 0)
			printf(" ");
	}
	printf("\n");


	return(0);
}

Compiler output:
main.c: In function 'main':
main.c:4:24: error: expected ']' before ';' token
    4 |         int i, n, v[100;
      |                        ^
      |                        ]
main.c:21:1: error: expected declaration or statement at end of input
   21 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
	int i, n, v[100;

	scanf("%d", &n);
	for (i = 0; i < n; i++)
	{
		scanf("%d", &v[i]);
	}
	for (i = n - 1; i >= 0; i--)
	{
		printf("%d", v[i]);
		if (i != 0)
			printf(" ");
	}
	printf("\n");


	return(0);
}

Compiler output:
main.c: In function 'main':
main.c:4:24: error: expected ']' before ';' token
    4 |         int i, n, v[100;
      |                        ^
      |                        ]
main.c:21:1: error: expected declaration or statement at end of input
   21 | }
      | ^
Language: C

int main(void){
 int n;
 int a;
 int i;
 int array[101];
 
 scanf("%d",&n);
 
 for(i=0;i<n;i++){
  scanf("%d",&a);
  from[i] = a;
 }

 for(i=0;i<n;i++){
  to[i] = from[(n-1)-i];
 }

 
 for(i=0;i<n;i++){
  if(i == n-1){
   printf("%d\n",to[i]);
  }else{
   printf("%d ",to[i]);
  }
 }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:2: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |  scanf("%d",&n);
      |  ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:7:2: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |  scanf("%d",&n);
      |  ^~~~~
main.c:7:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:11:3: error: 'from' undeclared (first use in this function)
   11 |   from[i] = a;
      |   ^~~~
main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:3: error: 'to' undeclared (first use in this function)
   15 |   to[i] = from[(n-1)-i];
      |   ^~
main.c:21:4: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   21 |    printf("%d\n",to[i]);
      |    ^~~~~~
main.c:21:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:21:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   23 |    printf("%d ",to[i]);
      |    ^~~~~~
main.c:23:4: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(void){
 int n;
 int a;
 int i;
 int from[101];
 int to[101]
 scanf("%d",&n);
  
 for(i=0;i<n;i++){
  scanf("%d",&a);
  from[i] = a;
 }
 
 for(i=0;i<n;i++){
  to[i] = from[(n-1)-i];
 }
 
  
 for(i=0;i<n;i++){
  if(i == n-1){
   printf("%d\n",to[i]);
  }else{
   printf("%d ",to[i]);
  }
 }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    7 |  scanf("%d",&n);
      |  ^~~~~
main.c:7:2: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:7:2: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |  scanf("%d",&n);
      |  ^~~~~
main.c:7:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:15:3: error: 'to' undeclared (first use in this function)
   15 |   to[i] = from[(n-1)-i];
      |   ^~
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:4: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   21 |    printf("%d\n",to[i]);
      |    ^~~~~~
main.c:21:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:21:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   23 |    printf("%d ",to[i]);
      |    ^~~~~~
main.c:23:4: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h> int main()
{     
	int a,i,b[100];     
	scanf("%d",&a);     
	for(i=0;i<a;i++)
	{         
		scanf("%d",&b[i]);     
	}     
	for(i=a-1;i>=0;i--)
	{         
		printf("%d",b[i]);         
		if(i!=0)
		{             
			printf(" ");         
		}     
	}     
	printf("\n");     
	return 0; 
}

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

#include <stdio.h>

int main(void){
    int n,i,j;
    scanf("%d",&n);
    int day[n-1];
    for(i=0;i<n;i++){
        scanf("%d",&day[i]);
    }
    for(j=0;j<n;j++){
        if(j)printf(" ");
        printf("%d",day[n-(j+1)]);
    }
    printf(" ")+
    return 0;
}
    
    

Compiler output:
main.c: In function 'main':
main.c:15:5: error: expected expression before 'return'
   15 |     return 0;
      |     ^~~~~~
Language: C

#include <stdio.h>
int main(void){
    int n,i;
     scanf("%d",&n);
    int a[n];
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    for(i=0;i<n;i++){
        printf("%d",a[n-i-1]);
if(n-i-1 != 0){
printf(" ");
    }

    return 0;
}

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

#include <stdio.h>
int main(void){
    int n,i;
     scanf("%d ",&n);
    int a[n];
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    for(i=0;i<n;i++){
        printf("%d",a[n-i-1]);
if(n-i-1 != 0){
printf(" ");
    }
    }
printf("\n")
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:13: error: expected ';' before 'return'
   15 | printf("\n")
      |             ^
      |             ;
   16 |     return 0;
      |     ~~~~~~
Language: C

#include<stdio.h>
int main(){
  int i,a,b,c;
  scanf("%d",&i);
  int m[i-1];
  for(a=0;a < i;a ++){
    scanf("%d",&m[a]);
  }
  for(a = 0;a < i;a;;)
    printf("%d ",m[i-a-1];
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:20: error: expected ')' before ';' token
    9 |   for(a = 0;a < i;a;;)
      |      ~             ^
      |                    )
main.c:10:26: error: expected ')' before ';' token
   10 |     printf("%d ",m[i-a-1];
      |           ~              ^
      |                          )
main.c:11:12: error: expected ';' before '}' token
   11 |   return 0;
      |            ^
      |            ;
   12 | }
      | ~
Language: C

#include<stdio.h>
int main(){
  int i,a,b,c;
  scanf("%d",&i);
  int m[i-1];
  for(a=0;a < i;a ++){
    scanf("%d",&m[a]);
  }
  for(a = 0;a < i;a;;){
    printf("%d ",m[i-a-1]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:20: error: expected ')' before ';' token
    9 |   for(a = 0;a < i;a;;){
      |      ~             ^
      |                    )
Language: C

#include<stdio.h>
int main(){
  int i,a;
  scanf("%d",&i);
  int m[i-1];
  for(a=0;a < i;a++){
    scanf("%d",&m[a]);
  }
  for(a = 0;a < i;a;;){
    printf("%d ",m[i-a-1]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:20: error: expected ')' before ';' token
    9 |   for(a = 0;a < i;a;;){
      |      ~             ^
      |                    )
Language: C

#include<stdio.h>
int main(void){
        int n,a[100],i;
        scanf("%d",&n);
        for(i=0;i<n;i++){
             scanf("%d",&a[i]);
        }
        for(i=n-1;i>0;i--){
             printf("%d ",a[i]);
        }
        putcahr('\n');
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'putcahr'; did you mean 'putchar'? [-Wimplicit-function-declaration]
   11 |         putcahr('\n');
      |         ^~~~~~~
      |         putchar
Language: C

#include<stdio.h>
int main(void){
        int n,a[100],i;
        scanf("%d",&n);
        for(i=0;i<n;i++){
             scanf("%d",&a[i]);
        }
        for(i=n-1;i>0;i--){
             printf("%d ",a[i]);
        }
        putcahr('?\n');
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'putcahr'; did you mean 'putchar'? [-Wimplicit-function-declaration]
   11 |         putcahr('?\n');
      |         ^~~~~~~
      |         putchar
main.c:11:17: warning: multi-character character constant [-Wmultichar]
   11 |         putcahr('?\n');
      |                 ^~~~~
Language: C

#include<stdio.h>
int main(){
????????int a,i,b[100];
????????scanf("%d",&a);
????????for(i=0;i<a;i++){
????????????????scanf("%d",&b[i]);
????????}
????????for(i=a-1;i>=0;i--){
????????????????printf("%d",b[i]);
????????????????if(i!=0){
????????????????????????printf(" ");
????????????????}
????????}
????????printf("\n");
????????return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: expected expression before '?' token
    3 | ????????int a,i,b[100];
      | ^
main.c:4:1: error: expected expression before '?' token
    4 | ????????scanf("%d",&a);
      | ^
main.c:4:21: error: 'a' undeclared (first use in this function)
    4 | ????????scanf("%d",&a);
      |                     ^
main.c:4:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:1: error: expected expression before '?' token
    5 | ????????for(i=0;i<a;i++){
      | ^
main.c:15:1: error: expected expression before '?' token
   15 | ????????return 0;
      | ^
Language: C

#include<stdio.h>

int main(void){
   int a[10000], b[10000], n, i;
   scanf("%d", &n);
   for(i = 0; i < n; i++){
      scanf("%d", &a[i]);
   }
   for(i = 0; i < n; i++){
      b[n - i - 1] = a[i];
   }
   printf("%d", b[0]);
   for(i = 1; i < n; i++){
      printf(" %d", b[i]);
   }
   printf("\n")
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:16: error: expected ';' before 'return'
   16 |    printf("\n")
      |                ^
      |                ;
   17 |    return 0;
      |    ~~~~~~
Language: C

#include <stdio.h>

int main(){
    int n;
    scanf("%d",&n);
    int a[100];
    int i=0;
    while(i<n){
        scanf("%d",&a[i]);
        i++;
    }
    for(i=n-1;i>=;i--){
        printf("%d \n",a[i]);
    }
}

Compiler output:
main.c: In function 'main':
main.c:12:18: error: expected expression before ';' token
   12 |     for(i=n-1;i>=;i--){
      |                  ^
Language: C

#include <stdio.h>

int main(void){
    int n, i;
    int a[100] = {0};

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

    for(i = n - 1; i >= 0; i--){
       if(!i) printf(" ");
       printf("%d", a[i];
    }
    puts("");
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:25: error: expected ')' before ';' token
   14 |        printf("%d", a[i];
      |              ~          ^
      |                         )
main.c:14:26: error: expected ';' before '}' token
   14 |        printf("%d", a[i];
      |                          ^
      |                          ;
   15 |     }
      |     ~
Language: C

#include <stdio.h>

int main(){
    int i, n;
    int arr[100];
    scanf("%d", &n);
    for(i=0;i<n;i++){
        scanf(" %d", &arr[i]);
    }
    for(i=0;i<n;i++){
        if(i)printf(" ");
        printf("%d", arr[n-i-1]);
    }
    printf("\n");

Compiler output:
main.c: In function 'main':
main.c:14:5: error: expected declaration or statement at end of input
   14 |     printf("\n");
      |     ^~~~~~
Language: C

#include <stdio.h>

int main(void){

        int n,a[1000],i;
        scanf("%d",&n);

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

        for(i=n-1;i>=0;i--){
                printf("%d",a[i]);
                if(i==0)
                        break;
                printf(" ");
        }
????????????puts("");
        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:1: error: expected expression before '?' token
   18 | ????????????puts("");
      | ^
Language: C

#include <stdio.h>

int main(void)
{
	int a[100], n, i ;
	scanf_s("%d", &n);

	
	for (i = 0; i < n; i++) {
		scanf_s("%d", &a[i]);
	}

	for (i = n - 1;  i > 0; i--) {
		printf("%d ", a[i]);
	}
	printf("%d\n ", a[0]);

	return 0;
}


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

#include <stdio.h>

int main(void)
{
	int a[100], n, i ;
	scanf_s("%d", &n);

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

	for (i = n - 1;  i > 0; i--) {
		printf("%d ", a[i]);
	}
	printf("%d\n ", a[0]);

	return 0;
}


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

#include <stdio.h>

int main(void)
{
	int a[100], n, i;
	scanf_s("%d", &n);


	for (i = 0; i < n; i++) {
		scanf_s("%d", &a[i]);
	}

	for (i = n - 1; i >= 0; i--) {
		printf(" %d ", a[i]);
	}
	

	return 0;
}


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

#include<stdio.h>
int main(void){
        int n,i,x,f;
        scanf("%d",&n);
        int a[n];
        for(i=0;i<n;i++){
         scanf("%d",&a[i]);
        }
        for(i=n;i>0;i-1){
         printf("%d ",a[i]}
        }
        printf("%d",a[0]}

        
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:27: error: expected ')' before '}' token
   10 |          printf("%d ",a[i]}
      |                ~          ^
      |                           )
main.c:10:27: error: expected ';' before '}' token
   10 |          printf("%d ",a[i]}
      |                           ^
      |                           ;
main.c: At top level:
main.c:12:16: error: expected declaration specifiers or '...' before string constant
   12 |         printf("%d",a[0]}
      |                ^~~~
main.c:12:21: error: unknown type name 'a'
   12 |         printf("%d",a[0]}
      |                     ^
main.c:12:25: error: expected ';', ',' or ')' before '}' token
   12 |         printf("%d",a[0]}
      |                         ^
main.c:15:9: error: expected identifier or '(' before 'return'
   15 |         return 0;
      |         ^~~~~~
main.c:16:1: error: expected identifier or '(' before '}' token
   16 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
        int n,i,x,f;
        scanf("%d",&n);
        int a[n];
        for(i=0;i<n;i++){
         scanf("%d",&a[i]);
        }
        for(i=n;i>0;i-1){
         printf("%d ",a[i])
        }
        printf("%d",a[0])

        
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:28: error: expected ';' before '}' token
   10 |          printf("%d ",a[i])
      |                            ^
      |                            ;
   11 |         }
      |         ~                   
main.c:12:26: error: expected ';' before 'return'
   12 |         printf("%d",a[0])
      |                          ^
      |                          ;
......
   15 |         return 0;
      |         ~~~~~~
Language: C

#inlcude <stdio.h>

int main(void)
{
	int n, a[100], i;

	scanf("%d\n", &n);
	for (i = 0; i < n; i++) {
		scanf("%d", &a[i]);
	}
	for (i = n - 1; i >=0 ; i--) {
		printf("%d", a[i]);
		if (i != 0) printf(" ");
	}
}



Compiler output:
main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude <stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |         scanf("%d\n", &n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inlcude <stdio.h>
main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |         scanf("%d\n", &n);
      |         ^~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:12:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 |                 printf("%d", a[i]);
      |                 ^~~~~~
main.c:12:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
int main(){
    unsigned short num;
    unsigned short i = 0, j = 0;
    unsigned short ielt[100];
    unsigned char celt[500];
    unsigned short work;
    scanf("%d", &num);
    scanf("%s", celt);
    for(i = 0;i < 100;i++){
        ielt[i] = 0;
    }
    for(i = 0;i < num;i++){
        while(celt[j] != ' '){
            ielt[i] *= 10;
            ielt[i] += (celt[j] - 48);
            j++;
        }
    }
    for(i = 0;i < num;i++){
        work = ielt[i];
        ielt[i] = ielt[num - 1 - i];
        elt[num - 1 - i] = work;
    }
    for(i = 0;i < num - 1;i++){
        printf("%d ", ielt[i]);
    }
    printf("%d\n", ielt[num - 1]);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:23:9: error: 'elt' undeclared (first use in this function); did you mean 'celt'?
   23 |         elt[num - 1 - i] = work;
      |         ^~~
      |         celt
main.c:23:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
    unsigned short num;
    unsigned short i;
    unsigned short elt[100];
    for(i = 0;i < 100;i++){
        elt[i] = 0;
    }
    scanf("%d", &nun);
    for(i = 0;i < num;i++){
        sanf("%d", elt[i]);
    }
    for(i = num - 1;i > 0;i--){
        printf("%d ", elt[i]);
    }
    printf("%d\n", elt[0]);
    return 0;
}



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

#include<stdio.h>
int main(){
    unsigned short num;
    unsigned short i;
    unsigned short elt[100];
    for(i = 0;i < 100;i++){
        elt[i] = 0;
    }
    scanf("%d", &num);
    for(i = 0;i < num;i++){
        sanf("%d", elt[i]);
    }
    for(i = num - 1;i > 0;i--){
        printf("%d ", elt[i]);
    }
    printf("%d\n", elt[0]);
    return 0;
}



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

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <math.h>

int main(){
	int num;
	int i;
	int temp;
	int *data;
	int *rev;
	
	scanf("%d", &num);
	data = (int*)malloc(sizeof(int) * num);
	rev = (int*)malloc(sizeof(int) * num);

	for(i=0; i<num; i++){
		scanf("%d", &data[i]);		
		rev[num - 1 - i] = data[i];
	}
	
	for(i=0; i<num; i++){
		if((i>0) && ()){
			printf(" ");
		}

		printf("%d", rev[i]);
	}
	printf("\n");

	free(data);
	free(rev);

	return 0;

}


Compiler output:
main.c: In function 'main':
main.c:24:30: error: expected expression before ')' token
   24 |                 if((i>0) && ()){
      |                              ^
Language: C

#include<stdio.h>
int main(void)
{

int n,i,tmp,j,k;
	int a[n];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		for(j=n-1;j>0;j--){
			for(k=0;k<j;k++){
				if(a[i]<a[i+1]){
				tmp=a[i];
				a[i]=a[i+1];
				a[i+1]=tmp;
				}
			}
		}
	}
	for(i=0;i<n;i++)
		printf("%d",a[i]);


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

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

int main(void)
{
    char buffer[256];
    int n, input[100], counter=0, i;
    char *ptr;
    
    fgets(buffer, sizeof(int), stdin);
    sscanf(buffer, "%d", &n);
   
    fgets(buffer, sizeof(int)*100, stdin);
    ptr = strtok(buffer, " ");
    while(ptr!=NULL)
    {
        sscanf(ptr, "%d", &input[counter]);
        ptr = strtok(NULL, " ");
        counter++;
    }
    for(i=counter-1; i>=0; i--)
    {
        printf("%d", input[i]);
        if(i!=0) putchar(' ');
        else putchar('\n');
    }
    return(0);
}"


Compiler output:
main.c:28:2: warning: missing terminating " character
   28 | }"
      |  ^
main.c:28:2: error: missing terminating " character
Language: C

#include<stdio.h>

int main()
{
	int a[100], n;
	scanf("%d", &n);
	for (i = 0; i < n; i++)
		scanf("%d", a + i);
	for (i = n - 1; i > 0; i++)
		printf("%d ", a[i]);
	printf("%d\n", a[0]);

	return 0;
}


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

#include <stdio.h>
int main(void){
    int n;
    int a[i];
    
    scanf("%d\n", &n);
    for(int i=0; i<n; i++){
        scanf("%d", &a[i]);
    }
    
    for(i=a-1; i>=0; i--){
        if(i>0) printf("%d ", a[i]);
        else printf("%d", a[i]);
    }
    
    printf("\n");
    
    return 0;
}



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

#include <stdio.h>
int main(void){
    int i=0,
    int n;
    int a[i]={0};
    
    scanf("%d\n", &n);
    for(i=0; i<n; i++){
        scanf("%d", &a[i]);
    }
    
    for(i=n-1; i>=0; i--){
        if(i>0) printf("%d ", a[i]);
        else printf("%d", a[i]);
    }
    
    printf("\n");
    
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:4:5: error: expected identifier or '(' before 'int'
    4 |     int n;
      |     ^~~
main.c:5:14: error: variable-sized object may not be initialized except with an empty initializer
    5 |     int a[i]={0};
      |              ^
main.c:7:20: error: 'n' undeclared (first use in this function)
    7 |     scanf("%d\n", &n);
      |                    ^
main.c:7:20: note: each undeclared identifier is reported only once for each function it appears in