View Code of Problem 52

#include <stdio.h>
#include <stdio.h>
int main()
{
	char a[100],i,len;
  	gets(a);
  	len=strlen(a);
  	for(i=len-1;i>=0;--i)
          printf("%c",a[i]) 
}
/*
Main.c: In function 'main':
Main.c:6:4: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
    gets(a);
    ^
Main.c:7:4: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    len=strlen(a);
    ^
Main.c:7:8: warning: incompatible implicit declaration of built-in function 'strlen'
    len=strlen(a);
        ^
Main.c:9:11: warning: array subscript has type 'char' [-Wchar-subscripts]
           printf("%c",a[i]) 
           ^
Main.c:10:1: error: expected ';' before '}' token
 }
 ^
*/

Double click to view unformatted code.


Back to problem 52