#include<stdio.h> #include<string.h> void main() { char a[100]; int i; gets(a); for(i=strlen(a-1);j>=0;j--) { printf("%c",a[i]); } } /* Main.c:3:6: warning: return type of 'main' is not 'int' [-Wmain] void main() ^ Main.c: In function 'main': Main.c:7:2: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(a); ^ Main.c:8:20: error: 'j' undeclared (first use in this function) for(i=strlen(a-1);j>=0;j--) ^ Main.c:8:20: note: each undeclared identifier is reported only once for each function it appears in */ |
Double click to view unformatted code.