#include #include int main(void){ char s1[256],s2[256]; int i,j=0; gets(s1); for(i=strlen(s1)-1;i>=0;i--) { s2[j++]=s1[i]; } puts(s2); return 0;}这样就把字符串s1倒序存放去s2了,输出了s2.