#include<stdio.h> #include<string.h> #define N 100 int main() { char str[N]; int j,len; gets(str); len=strlen(str); for(j=len-1;j>=0;j--) { printf("%c",str[j]); } return 0; }
Double click to view unformatted code.