#include <stdio.h> #include <string.h> main(){ char str[100],*p = str; int i,n = 0; gets(p); for(i = 0; ;i++){ if(*(p+i) == '\0') break; n++; } for(i = n-1; i>=0;i--) printf("%c",*(p+i)); return 0; }
Double click to view unformatted code.