/in/foo.c: In function 'rev':
/in/foo.c:9:9: error: subscripted value is neither array nor pointer nor vector
y[i]=x[len-i];
^
/in/foo.c:12:7: error: subscripted value is neither array nor pointer nor vector
if(x[i]!=y[i])
^
/in/foo.c: In function 'main':
/in/foo.c:23:5: warning: 'gets' is deprecated [-Wdeprecated-declarations]
gets(a);
^~~~
In file included from /in/foo.c:1:0:
/usr/include/stdio.h:640:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^~~~
/in/foo.c:24:12: warning: passing argument 1 of 'rev' makes integer from pointer without a cast [-Wint-conversion]
int x=rev(a,strlen(a));
^
/in/foo.c:4:5: note: expected 'char' but argument is of type 'char *'
int rev(char x,int len)
^~~
/in/foo.c:26:3: error: expected ';' before 'else'
else printf("NO")
^~~~