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

#include<stdio.h>

int main(void){
	char str[21];
	int i;

	scanf("%s",str);

	for(i=20,i>=0;i--){
		printf("%c"str[i]);
			}
		printf("\n");
return 0

}

Compiler output:
main.c: In function 'main':
main.c:9:26: error: expected ';' before ')' token
    9 |         for(i=20,i>=0;i--){
      |                          ^
      |                          ;
main.c:10:28: error: expected ')' before 'str'
   10 |                 printf("%c"str[i]);
      |                       ~    ^~~
      |                            )
main.c:13:9: error: expected ';' before '}' token
   13 | return 0
      |         ^
      |         ;
   14 | 
   15 | }
      | ~
Language: C

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

int main(void){
	char str[21];
	int i;

	scanf("%s",str);

	for(i=strlen(str),i>=0;i--){
		printf("%c"str[i]);
			}
		printf("\n");

}

Compiler output:
main.c: In function 'main':
main.c:10:35: error: expected ';' before ')' token
   10 |         for(i=strlen(str),i>=0;i--){
      |                                   ^
      |                                   ;
main.c:11:28: error: expected ')' before 'str'
   11 |                 printf("%c"str[i]);
      |                       ~    ^~~
      |                            )
Language: C

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

int main(void){
	char str[21];
	int i;

	scanf("%s",str);

	for(i=strlen(str),i>=0;i--){
		printf("%c"str[i]);
			}
		printf("\n");
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:10:35: error: expected ';' before ')' token
   10 |         for(i=strlen(str),i>=0;i--){
      |                                   ^
      |                                   ;
main.c:11:28: error: expected ')' before 'str'
   11 |                 printf("%c"str[i]);
      |                       ~    ^~~
      |                            )
Language: C

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

int main(void){
	char str[21];
	int i;

	scanf("%s",str);
	for(i=strlen(str)-1,i>=0;i--){
        printf("%c"str[i]);
			}
        printf("\n");
        return 0;

}

Compiler output:
main.c: In function 'main':
main.c:9:37: error: expected ';' before ')' token
    9 |         for(i=strlen(str)-1,i>=0;i--){
      |                                     ^
      |                                     ;
main.c:10:20: error: expected ')' before 'str'
   10 |         printf("%c"str[i]);
      |               ~    ^~~
      |                    )
Language: C

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

int main(void){
	char str[22];
	int i;

	scanf("%s",str);
	for(i=strlen(str)-1,i>=0;i--){
        printf("%c"str[i]);
			}
        printf("\n");
        return 0;

}

Compiler output:
main.c: In function 'main':
main.c:9:37: error: expected ';' before ')' token
    9 |         for(i=strlen(str)-1,i>=0;i--){
      |                                     ^
      |                                     ;
main.c:10:20: error: expected ')' before 'str'
   10 |         printf("%c"str[i]);
      |               ~    ^~~
      |                    )
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
	char str[22];
	int i;

	scanf("%s",str);
	for(i=strlen(str)-1,i>=0;i--){
        printf("%c"str[i]);
			}
        printf("\n");
        return 0;

}

Compiler output:
main.c: In function 'main':
main.c:8:37: error: expected ';' before ')' token
    8 |         for(i=strlen(str)-1,i>=0;i--){
      |                                     ^
      |                                     ;
main.c:9:20: error: expected ')' before 'str'
    9 |         printf("%c"str[i]);
      |               ~    ^~~
      |                    )
Language: C

#include <stdio.h>
?
int main(void) {
????int i,j;
????char mozi[21];
????scanf("%s",mozi);
????for(i=0;mozi[i]!=0;i++);
????for(j=i-1;j>=0;j--)printf("%c",mozi[j]);
????printf("\n");
????return 0;
}

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

#include <stdio.h>


int main(void)
{
	char	str[20] = {0}, str_copy[20] = {0};
	int			i,j=0;
	
	scanf("%s",str);
	
	while(1){
		if(str[j] == null) break;
		j++;
	}

	for(i=0;i<j;i++){
		str_copy[i]=str[j-1-i];
	}
	printf("%s\r\n", str_copy);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:30: error: 'null' undeclared (first use in this function)
   12 |                 if(str[j] == null) break;
      |                              ^~~~
main.c:12:30: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
int main ()
{   char a[20];
    gets(a);

    strrev(a);

    printf("%s\n",a);


    return 0;
}

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

#include<stdio.h>
#include<string.h>
int main()

{   char a[100];
    gets(a);
    strrev(a);
    printf("%s\n",a)

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    6 |     gets(a);
      |     ^~~~
      |     fgets
main.c:7:5: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    7 |     strrev(a);
      |     ^~~~~~
      |     strsep
main.c:8:21: error: expected ';' before 'return'
    8 |     printf("%s\n",a)
      |                     ^
      |                     ;
    9 | 
   10 |     return 0;
      |     ~~~~~~
Language: C

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

int main()
{
   char arr[20];

   gets(arr);

   strrev(arr);

   printf("\n",arr);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:4: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |    gets(arr);
      |    ^~~~
      |    fgets
main.c:10:4: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
   10 |    strrev(arr);
      |    ^~~~~~
      |    strsep
Language: C

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
 char ch[20];
 clrscr();
 printf("Enter the String\n");
 gets(ch);
 printf("Reverse is:");
 printf("%s",strrev(ch));
 getch();
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<string.h>
int main(){
    char str[20];
    char *rev;
    gets(str);
    ("Enter any string : ");
    ("%s",str);
    rev = strrev(str);

    printf("Reverse string is : %s",rev);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    6 |     gets(str);
      |     ^~~~
      |     fgets
main.c:9:11: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    9 |     rev = strrev(str);
      |           ^~~~~~
      |           strsep
main.c:9:9: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    9 |     rev = strrev(str);
      |         ^
Language: C

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

int main()
{
   char a[20];

   printf("\n");
   gets(a);

   strrev(a);

   printf("%s\n",a);

   return 0;
}

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

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

int main()
{
   char a[19];

   gets(a);

   strrev(a);

   printf("%s\n",a);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:4: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |    gets(a);
      |    ^~~~
      |    fgets
main.c:10:4: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
   10 |    strrev(a);
      |    ^~~~~~
      |    strsep
Language: C

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

int main()
{
	char inp[96];
	int  len;
	int  i;
	/**--init --**/

	for (;;) {
		/**--input--**/
		gets(inp);
		len = strlen(inp);
		if (len==0) {
			break;
		}

		for (i=len-1 ; i>=0 ; i--) {
			printf("%c",inp[i]);
		}
		printf("\n");
		break;
	}
	return 0;
}

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

#include<stdio.h>
#include<string.h>
int main()
{
    char str[50];
    char *rev;
    scanf("%s",str);
    rev = strrev(str);

    printf("%s\n",rev);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:11: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    8 |     rev = strrev(str);
      |           ^~~~~~
      |           strsep
main.c:8:9: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    8 |     rev = strrev(str);
      |         ^
Language: C

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


char name[1000];

while( gets(name) ){

printf("%s\n", strrev(name));
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:8: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 | while( gets(name) ){
      |        ^~~~
      |        fgets
main.c:10:16: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
   10 | printf("%s\n", strrev(name));
      |                ^~~~~~
      |                strsep
Language: C

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

int main(void){
    char s[32];
    int len;
    scanf("%s",s)
    len = strlen(s);
    for(i = len-1;i >= 0;i--){
        printf("%c",s[i])
    }
    printf("\n");
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:18: error: expected ';' before 'len'
    7 |     scanf("%s",s)
      |                  ^
      |                  ;
    8 |     len = strlen(s);
      |     ~~~           
main.c:9:9: error: 'i' undeclared (first use in this function)
    9 |     for(i = len-1;i >= 0;i--){
      |         ^
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:26: error: expected ';' before '}' token
   10 |         printf("%c",s[i])
      |                          ^
      |                          ;
   11 |     }
      |     ~
Language: C

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

main()
{
 char str[20];

 scanf("%s",str);

 int i;

 for(i=strlen(str)-1,i>=0,i--){
  printf("%c",str[i]);
 }

 puts();

 return 0;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:12:30: error: expected ';' before ')' token
   12 |  for(i=strlen(str)-1,i>=0,i--){
      |                              ^
      |                              ;
main.c:12:30: error: expected expression before ')' token
main.c:16:2: error: too few arguments to function 'puts'
   16 |  puts();
      |  ^~~~
In file included from main.c:1:
/usr/include/stdio.h:714:12: note: declared here
  714 | extern int puts (const char *__s);
      |            ^~~~
Language: C

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

main()
{
 char str[20];

 scanf("%s",str);

 int i;

 for(i=strlen(str)-1;i>=0;i--){
  printf("%c",str[i]);
 }

 puts();

 return 0;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:16:2: error: too few arguments to function 'puts'
   16 |  puts();
      |  ^~~~
In file included from main.c:1:
/usr/include/stdio.h:714:12: note: declared here
  714 | extern int puts (const char *__s);
      |            ^~~~
Language: C

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

int main()
{
   char arr[100];

   printf("Enter a string to reverse\n");
   gets(arr);

   strrev(arr);

   printf("Reverse of entered string is \n%s\n",arr);

   return 0;
}

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

#include<stdio.h>
#include<string.h>
int main()
{
    char str[50];
    char *rev;
    printf("Enter any string : ");
    scanf("%s",str);
    rev = strrev(str);

    printf("%s",rev);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:11: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    9 |     rev = strrev(str);
      |           ^~~~~~
      |           strsep
main.c:9:9: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    9 |     rev = strrev(str);
      |         ^
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
    char str[20];
    char *rev;
    printf("Enter any string : ");
    scanf("%s",str);
    rev = strrev(str);

    printf("%s",rev);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:11: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    9 |     rev = strrev(str);
      |           ^~~~~~
      |           strsep
main.c:9:9: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    9 |     rev = strrev(str);
      |         ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
    char *s;
    int i;
    scanf("%s", s);
    int len = strlen(s);
    for(i = len - 1; i >= 0; i--)
        putchar(s[i]);
    putchar('\n')
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:18: error: expected ';' before 'return'
   10 |     putchar('\n')
      |                  ^
      |                  ;
   11 | 
   12 |     return 0;
      |     ~~~~~~
Language: C

#include<stdio.h>
int main()
{
    char str[20];
    gets(str);
    strrev(str);
    puts(str);
    return 0;
}

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

#include<stdio.h>
#include<string.h>
int main()
{
    char str[20];
    char *rev;
    printf("Enter any string :\n");
    scanf("%s",str);
    rev = strrev(str);
    printf("Reverse string is : %s\n",rev);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:11: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    9 |     rev = strrev(str);
      |           ^~~~~~
      |           strsep
main.c:9:9: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    9 |     rev = strrev(str);
      |         ^
Language: C

#include<stdio.h>
#include<string.h>
main()
{
 char str[50],revstr[50];
 int i=0,j=0;
 printf("Enter the string to be reversed : ");
 scanf("%s",str);
 for(i=strlen(str)-1;i>=0;i--)
 {
 revstr[j]=str[i];
 j++;
 }
 revstr[j]='\0';
 printf("Input String : %s",str);
 printf("\nOutput String : %s",revstr);
 getch();
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:17:2: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
   17 |  getch();
      |  ^~~~~
      |  getc
Language: C

int main()
{
   char inputString[20], temp;
   int length, leftIndex, rightIndex;
   printf("Enter a string to reverse\n");
   gets(inputString);
   /* Find length of string */
   length = strlen(inputString);
   /* 
    * Initialize leftIndex and rightDex to position 
    * of first and last character of String
    */
   leftIndex = 0;
   rightIndex = length -1;
    
   while(leftIndex < rightIndex){
       temp = inputString[leftIndex];
       inputString[leftIndex] = inputString[rightIndex];
       inputString[rightIndex] = temp;
        
       leftIndex++;
       rightIndex--;
   }
    
   printf("Reversed string is: %s\n", inputString);
   getch();
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:4: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 |    printf("Enter a string to reverse\n");
      |    ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:5:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    5 |    printf("Enter a string to reverse\n");
      |    ^~~~~~
main.c:5:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:4: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    6 |    gets(inputString);
      |    ^~~~
main.c:8:13: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |    length = strlen(inputString);
      |             ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
  +++ |+#include <string.h>
    1 | int main()
main.c:8:13: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |    length = strlen(inputString);
      |             ^~~~~~
main.c:8:13: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:26:4: error: implicit declaration of function 'getch' [-Wimplicit-function-declaration]
   26 |    getch();
      |    ^~~~~
Language: C

#include<stdio.h>
#include<conio.h>
void main()
{
 int i,count=0;
 char ch[20];
 clrscr();
 printf("Enter the string\n");
 gets(ch);
 for(i=0;ch[i]!='\0';i++)
 {
  count++;
 }
  printf("Reverse is:");
 for(i=count-1;i>=0;i--)
 {
   printf("%c",ch[i]);
 }
  getch();
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(){
    int i,count=1;
    char str[21];
    
    for (i=0; i<20; i++) {
        scanf("%s",str[i]);
        count++
    }
    for (i=count; i>0; i--) {
        printf("%s",str[i]);
    }
    
    return(0);
}

Compiler output:
main.c: In function 'main':
main.c:9:16: error: expected ';' before '}' token
    9 |         count++
      |                ^
      |                ;
   10 |     }
      |     ~
Language: C

#include <stdio.h>

int main(){
    int i,count=1;
    char str[21];
    
    for (i=0; i<20; i++) {
        scanf("%c",str[i]);
        count++
    }
    for (i=count; i>0; i--) {
        printf("%c",str[i]);
    }
    
    return(0);
}

Compiler output:
main.c: In function 'main':
main.c:9:16: error: expected ';' before '}' token
    9 |         count++
      |                ^
      |                ;
   10 |     }
      |     ~
Language: C

#include <stdio.h>
int main(void)
{
	char str[32];
	int i;
	
	scanf("%s", str);
	
	for(i = 20; i <= 0; i--)
		printf("%c", str[i]);
		
	return0;
}

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

#include <stdio.h>
int main(void)
{
	char str[32];
	int i = 0;
	do{
		scanf("%c", &str[i]);
		i++;
	}while(str[i] != NULL);
	
	while(i >= 0){
		printf("%c", str[i]);
		i--;
	}
	
	return0;
}

Compiler output:
main.c: In function 'main':
main.c:9:23: warning: comparison between pointer and integer
    9 |         }while(str[i] != NULL);
      |                       ^~
main.c:16:9: error: 'return0' undeclared (first use in this function)
   16 |         return0;
      |         ^~~~~~~
main.c:16:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

 int main()
 {
 char d[];
scanf("%s",&d);
 int len=strlen(d);
 int i;

 for(i=0;i<len/2;i++)
 {
 d[i]^=d[len-i-1];
 d[len-i-1]^=d[i];
 d[i]^=d[len-i-1];
 }
 printf("%s\n",d);
 }

Compiler output:
main.c: In function 'main':
main.c:6:7: error: array size missing in 'd'
    6 |  char d[];
      |       ^
Language: C

#include<stdio.h>

int main(){

char buf[20];
int i;
scanf("%s",&buf);

for(i=20;i>0i--){

if(buf[i]==\0){
break;
}

}

for(i=i;i>0i--){
printf("%c",buf[i]);
}
printf("%n");

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: lvalue required as decrement operand
    9 | for(i=20;i>0i--){
      |              ^~
main.c:9:16: error: expected ';' before ')' token
    9 | for(i=20;i>0i--){
      |                ^
      |                ;
main.c:11:12: error: stray '\' in program
   11 | if(buf[i]==\0){
      |            ^
main.c:17:13: error: lvalue required as decrement operand
   17 | for(i=i;i>0i--){
      |             ^~
main.c:17:15: error: expected ';' before ')' token
   17 | for(i=i;i>0i--){
      |               ^
      |               ;
Language: C

#include<stdio.h>

int main(){

char buf[20];
int i;
scanf("%s",&buf);

for(i=20;i>0i--){

if(buf[i]=='\0'){
break;
}

}

for(i=i;i>0i--){
printf("%c",buf[i]);
}
printf("%n");

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: lvalue required as decrement operand
    9 | for(i=20;i>0i--){
      |              ^~
main.c:9:16: error: expected ';' before ')' token
    9 | for(i=20;i>0i--){
      |                ^
      |                ;
main.c:17:13: error: lvalue required as decrement operand
   17 | for(i=i;i>0i--){
      |             ^~
main.c:17:15: error: expected ';' before ')' token
   17 | for(i=i;i>0i--){
      |               ^
      |               ;
Language: C

#include <bits/stdc++.h>

int main(void){
    char str[21];
    int i;
    gets(str);
    for (i=strlen(str);i>=0;--i){
        printf("%c",str[i]);
    }
    printf("\n");
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

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

int main()
{
    char str[20 + 1];

    gets(str);

    strrev(str);

    puts(str);



    return 0;
}

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

#include<stdio.h>
#include<string.h>
int main()
{
    char str[21];
    gets(str);
    strrev(str);
    puts(str);
    return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
string s, a;
int main(){
	cin>>s;
	for(int i=s.length()-1;i>=0;i--){
		a=a+s[i];
	}
	cout<<a<<endl;
	
}

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
    int rev;
    char str[20];
    scanf("%s",str);
    for(rev=strlen(str)-1;rev>=0;rev--)
        printf("%c",str[rev]);
    printf("\n")
    return 0;
}

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

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

#define MAX 1000

int main()
{
	int i,len,count=0;
	char str[MAX];
	while (1)
	{
		scanf("%s", &str);
		len = strlen(str);
		if (0 <= len && len <= 20){
			break;
		}
	}

	for (i = 0; str[i] != '\0';i++){ count++; }
	for (i=count-1; i >= 0; i--){
		printf("%c", str[i]);
	}
	printf("\n");
	return 0;

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

#include<stdio.h>

int main(void){
char stro[],strr[];
int i=0;
scanf("%s",stro)
while(i<strlen(stro)){
strr[i]=stro[strlen(stro)-i]
}
printf("%s\n",strr[]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:6: error: array size missing in 'stro'
    4 | char stro[],strr[];
      |      ^~~~
main.c:4:13: error: array size missing in 'strr'
    4 | char stro[],strr[];
      |             ^~~~
main.c:6:17: error: expected ';' before 'while'
    6 | scanf("%s",stro)
      |                 ^
      |                 ;
    7 | while(i<strlen(stro)){
      | ~~~~~
Language: C

#include<stdio.h>

int main(void){
char stro[20],strr[20];
int i=0;
scanf("%s",stro)
while(i<strlen(stro)){
strr[i]=stro[strlen(stro)-i]
}
printf("%s\n",strr[]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: expected ';' before 'while'
    6 | scanf("%s",stro)
      |                 ^
      |                 ;
    7 | while(i<strlen(stro)){
      | ~~~~~
Language: C

#include<stdio.h>
 
int main(void){
char stro[20],strr[20];
int i=0;
scanf("%s",stro);
while(i<strlen(stro)){
strr[i]=stro[strlen(stro)-i]
}
printf("%s\n",strr[]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    7 | while(i<strlen(stro)){
      |         ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:7:9: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    7 | while(i<strlen(stro)){
      |         ^~~~~~
main.c:7:9: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:8:29: error: expected ';' before '}' token
    8 | strr[i]=stro[strlen(stro)-i]
      |                             ^
      |                             ;
    9 | }
      | ~                            
main.c:10:20: error: expected expression before ']' token
   10 | printf("%s\n",strr[]);
      |                    ^
Language: C

#include<stdio.h>
 
int main(void){
  char a[256];
  scanf("%s", a)
  for(i = strlen(a) - 1; i >= 0; i--){
    printf("%s",a[i]);
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:17: error: expected ';' before 'for'
    5 |   scanf("%s", a)
      |                 ^
      |                 ;
    6 |   for(i = strlen(a) - 1; i >= 0; i--){
      |   ~~~
Language: C

#include<stdio.h>
int main(){
  char z[20];
  int i,j;
  scanf("%s",&z);
    for(i=0; z[i]!=\0;i++);
    if(i<=20){
    for(j=i;j>=0;j--){
      printf("%c",z[j]);
    }
    printf("\n");
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:20: error: stray '\' in program
    6 |     for(i=0; z[i]!=\0;i++);
      |                    ^
Language: C

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

int main(char[] str){
  int i = 0;
  for(i = strlen(str) - 1; i >= 0; i--)
    printf("%c", str[i]);
  return 0;
} // end main

Compiler output:
main.c:4:17: error: expected ';', ',' or ')' before 'str'
    4 | int main(char[] str){
      |                 ^~~
Language: C

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

int main(){
  char[] str;
  scanf("%s", str); 
  int i = 0;
  for(i = strlen(str) - 1; i >= 0; i--)
    printf("%c", str[i]);
  return 0;
} // end main

Compiler output:
main.c: In function 'main':
main.c:5:7: error: expected identifier or '(' before '[' token
    5 |   char[] str;
      |       ^
main.c:6:15: error: 'str' undeclared (first use in this function)
    6 |   scanf("%s", str);
      |               ^~~
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:11: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |   for(i = strlen(str) - 1; i >= 0; i--)
      |           ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strlen'
    2 | #include<stdio.h>
  +++ |+#include <string.h>
    3 | 
main.c:8:11: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |   for(i = strlen(str) - 1; i >= 0; i--)
      |           ^~~~~~
main.c:8:11: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C

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

int main(){
  char[] str = "";
  scanf("%s", str); 
  int i = 0;
  for(i = strlen(str) - 1; i >= 0; i--)
    printf("%c", str[i]);
  return 0;
} // end main

Compiler output:
main.c: In function 'main':
main.c:5:7: error: expected identifier or '(' before '[' token
    5 |   char[] str = "";
      |       ^
main.c:6:15: error: 'str' undeclared (first use in this function)
    6 |   scanf("%s", str);
      |               ^~~
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:11: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |   for(i = strlen(str) - 1; i >= 0; i--)
      |           ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strlen'
    2 | #include<stdio.h>
  +++ |+#include <string.h>
    3 | 
main.c:8:11: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |   for(i = strlen(str) - 1; i >= 0; i--)
      |           ^~~~~~
main.c:8:11: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C

#include <stdio.h>
#include <string.h>
int main(void){
    char a[30];
    int n,i;
    gets(a);
    n=strlen(a);
    for(i=n-1;i>=0;i--){
        printf("%c",a[i]);
    }
    
}

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

#include<stdio.h>
#define N 20
int main()
{
	char a[N];
	gets(a);
	int i = 0;
	while (a[i++] != '\0')
	{
		continue;
	}
	for (i = i - 2; i >= 0; i--)
	{
		printf("%c", a[i]);
	}
	printf("\n");
	return 0;
}

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

#include <stdio.h>

int main(void)
{
	char str[20];
	int qty;
	
	gets(str);
	
	int i;
	for(i=0;i<20;i++)
	{
		if(str[i] == '\0')
		{
			qty = i;
			goto next;
		}
	}
	
	next:
	
	for(i=(qty-1);i>=0;i--)
	{
		printf("%c",str[i]);
	}
	
	printf("\n");
	
	return 0;
}

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

#include<stdio.h>
#include<string.h>
int main()
{
	char str[30];
	gets(str);
	for(int i=strlen(str)-1;i>=0;i--)
	printf("%c",str[i]);
	printf("\n");
}


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

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

int main()
{
	int i,len;
	char str[21];
	
	gets(str);
	len=strlen(str);
	
	for(i=len-1;i>=0;i--)
		printf("%c",str[i]);
		
	return 0;	
}


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

#include<stdio.h>
#include<string.h>
int main() {
	int i, n;
	char a[1000];
	gets(a);
	n = strlen(a);
	for (i = n-1 ; i>=0; i--)
		printf("%c\n", a[i]);
	getchar();
	getchar();
}


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

#include<stdio.h>
#include<string.h>
int main() {
	int i, n;
	char a[1000];
	gets(a);
	n = strlen(a);
	for (i = n-1 ; i>=0; i--)
		printf("%c", a[i]);
	printf("\n");
	getchar();
	getchar();
}


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

#include<stdio.h>
#include<string.h>
int main()
{
    char str[20];
    gets(str);
    strrev(str);
    printf("%s\n",str);
    return 0;

}



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

#include<stdio.h>
int main()
{
   char s[1000], r[1000];
   int begin, end, count = 0;
   gets(s);

   // Calculating string length

   while (s[count] != '\0')
      count++;

   end = count - 1;

   for (begin = 0; begin < count; begin++) {
      r[begin] = s[end];
      end--;
   }

   r[begin] = '\0';

   printf("%s\n", r);

   return 0;
}



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

#include <stdio.h>
#include <string.h>
int main(void)
{
	int t;
	char x[20 + 1];
	gets(x);
	t = strlen(x);
	while (t--) {
		printf("%c", x[t]);
	}
	printf("\n");

	return 0;
}


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

#include <stdio.h>

int main(void)
{
	int i;
	int qty;
	char str[21];
	
	for(i=0;i<21;i++)
	{
		str[i] = '\0';
	}
	
	gets(str);
	//fgets(str,21,stdin);
	
	for(i=0;i<21;i++)
	{
		if(str[i] == '\0')
		{
			qty = i;
		}
	}
	
	for(i=(qty-1);i>=0;i--)
	{
		printf("%c",str[i]);
	}
	
	printf("\n");
	
	return 0;
}


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

#include<stdio.h>

#include<string.h>

int main ()
{
    char str[20];
    


    /*scanf("%s",str[i]);
    l=strlen(str);

    for(i=l-1;i>=0;i--)
        printf("%c",str[i]);
    getch();*/
    gets(str);
    strrev(str);
    puts(str);
    getch();
}



Compiler output:
main.c: In function 'main':
main.c:17:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   17 |     gets(str);
      |     ^~~~
      |     fgets
main.c:18:5: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
   18 |     strrev(str);
      |     ^~~~~~
      |     strsep
main.c:20:5: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
   20 |     getch();
      |     ^~~~~
      |     getc
Language: C

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

int main ()
{
    char str1[200];
    gets(str1);
    strrev(str1);
    printf("%s",str1);

}


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

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

int main()
{
   char a[20];
   gets(a);
   strrev(a);
   printf("%s\n", a);
   return 0;
}



Compiler output:
main.c: In function 'main':
main.c:7:4: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |    gets(a);
      |    ^~~~
      |    fgets
main.c:8:4: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    8 |    strrev(a);
      |    ^~~~~~
      |    strsep
Language: C

#include<stdio.h>
#include<string.h>
int main(){
	char i,b,a[25];
	gets(a);
	b=strlen(a);
	for(i=b-1;i>=0;i--)
		printf("%c",a[i]);
	printf("\n");
}


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

#include <stdio.h>
int main(void){
    // Your code here!
    int main(void){
    char str[100];
    int i;
    int count=0;
    
    scanf("%s",str);
    
    for(i=0;str[i]!='\0';i++){
        count++;
    }
    for(i=count-1;i>=0;i--){
        printf("%c",str[i]);
    }
    printf("\n");

    return 0;
}




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

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

int main(){
  char a[20];
  char t;
  size_t len,i;
  
  scanf("%s",a);
  len = strlen(a);

  for(i = 0;i < len / 2 ,i++){
   t = a[i];a[i] = a[len - i-1];a[len - i-1] = t;
  }

  printf("%s",a);

 return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:12:29: error: expected ';' before ')' token
   12 |   for(i = 0;i < len / 2 ,i++){
      |                             ^
      |                             ;
Language: C

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

int main(){
  char a[20];
  char t;
  int len,i;
  
  scanf("%s",a);
  len = strlen(a);

  for(i = 0;i < len / 2 ,i++){
   t = a[i];a[i] = a[len - i-1];a[len - i-1] = t;
  }

  printf("%s",a);

 return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:12:29: error: expected ';' before ')' token
   12 |   for(i = 0;i < len / 2 ,i++){
      |                             ^
      |                             ;
Language: C

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

int main(){
  char a[20];
  int len,i;
  scanf("%s",a);
  len = strlen(a);
  for (i = len - 1; i >= 0; --i) putchar(a[i]);
  puts("")
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:11: error: expected ';' before 'return'
   10 |   puts("")
      |           ^
      |           ;
   11 |  return 0;
      |  ~~~~~~
Language: C

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

int main(){
  char a[20];
  char t;
  int len,i;
  
  scanf("%s",a);
  len = strlen(a);

  for (i = len - 1; i >= 0; --i) putchar(a[i]);

 puts("");


 return 0;

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

char s[22]="\0\n";main(i){for(i+=strlen(gets(s+2));putchar(s[i--]););}

Compiler output:
main.c:1:19: error: return type defaults to 'int' [-Wimplicit-int]
    1 | char s[22]="\0\n";main(i){for(i+=strlen(gets(s+2));putchar(s[i--]););}
      |                   ^~~~
main.c: In function 'main':
main.c:1:19: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:34: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    1 | char s[22]="\0\n";main(i){for(i+=strlen(gets(s+2));putchar(s[i--]););}
      |                                  ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
  +++ |+#include <string.h>
    1 | char s[22]="\0\n";main(i){for(i+=strlen(gets(s+2));putchar(s[i--]););}
main.c:1:34: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    1 | char s[22]="\0\n";main(i){for(i+=strlen(gets(s+2));putchar(s[i--]););}
      |                                  ^~~~~~
main.c:1:34: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:1:41: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | char s[22]="\0\n";main(i){for(i+=strlen(gets(s+2));putchar(s[i--]););}
      |                                         ^~~~
main.c:1:41: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
    1 | char s[22]="\0\n";main(i){for(i+=strlen(gets(s+2));putchar(s[i--]););}
      |                                         ^~~~~~~~~
      |                                         |
      |                                         int
main.c:1:41: note: expected 'const char *' but argument is of type 'int'
main.c:1:52: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
    1 | char s[22]="\0\n";main(i){for(i+=strlen(gets(s+2));putchar(s[i--]););}
      |                                                    ^~~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'putchar'
  +++ |+#include <stdio.h>
    1 | char s[22]="\0\n";main(i){for(i+=strlen(gets(s+2));putchar(s[i--]););}
Language: C

main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:24: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
      |                        ^~~~
main.c:1:34: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    1 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
      |                                  ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
  +++ |+#include <string.h>
    1 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
main.c:1:34: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    1 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
      |                                  ^~~~~~
main.c:1:34: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:1:50: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
    1 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
      |                                                  ^~~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'putchar'
  +++ |+#include <stdio.h>
    1 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
Language: C

#include<string.h>
#include<stdio.h>
main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
      | ^~~~
main.c: In function 'main':
main.c:3:1: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:3:24: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    3 | main(i){char a[20];for(gets(a),i=strlen(a);i;i--)putchar(a[i]);}
      |                        ^~~~
      |                        fgets
Language: C

main(i){char a[20];for(gets(a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(i){char a[20];for(gets(a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:24: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | main(i){char a[20];for(gets(a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}
      |                        ^~~~
main.c:1:34: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    1 | main(i){char a[20];for(gets(a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}
      |                                  ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
  +++ |+#include <string.h>
    1 | main(i){char a[20];for(gets(a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}
main.c:1:34: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    1 | main(i){char a[20];for(gets(a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}
      |                                  ^~~~~~
main.c:1:34: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:1:52: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
    1 | main(i){char a[20];for(gets(a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}
      |                                                    ^~~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'putchar'
  +++ |+#include <stdio.h>
    1 | main(i){char a[20];for(gets(a),i=strlen(a)+1;i;i--)putchar(a[i-1]);}
Language: C

include <stdio.h>
main(){
  int i;
  char str[21],a[21];
  scanf("%c",str);
  for(i=0;i<21;i++){
    if(str[i]=='\0') {
      a[21-i]='%0';
      break;
    }
    a[21-i]=str[i];
}
  printf("%c",a);
return 0; 
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c:8:15: warning: multi-character character constant [-Wmultichar]
    8 |       a[21-i]='%0';
      |               ^~~~
Language: C

include <stdio.h>
main(){
  int i;
  char str[21],a[21];
  scanf("%c",str);
  for(i=0;i<21;i++){
    if(str[i]=='\0') {
      a[21-i]='\0';
      break;
    }
    a[21-i]=str[i];
}
  printf("%c",a);
return 0; 
}

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

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

main(){
  int i,j=0;
  char b[21],a[21];
  scanf("%s",b);
  j=strlen(b);
   for(i=0;i<j;i++){
     a[i]=b[j-i-1];
}
   a[j]='\0';
   printf("%s\n",a);
return 0; 
}
#include <stdio.h>
#include <string.h>

main(){
  int i,j=0;
  char b[21],a[21];
  scanf("%s",b);
  j=strlen(b);
   for(i=0;i<j;i++){
     a[i]=b[j-i-1];
}
   a[j]='\0';
   printf("%s\n",a);
return 0; 
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c:19:1: error: return type defaults to 'int' [-Wimplicit-int]
   19 | main(){
      | ^~~~
main.c:19:1: error: redefinition of 'main'
main.c:4:1: note: previous definition of 'main' with type 'int()'
    4 | main(){
      | ^~~~