字符串反转
字符串反转
http://www.nowcoder.com/questionTerminal/e45e078701ab4e4cb49393ae30f1bb04
#include <stdio.h> #include <string.h> int main(void) { char str1[1000]; char str2[1000]; gets(str1); int num = strlen(str1); for(int i = 0; i < num; i++) str2[i] = str1[num - 1 - i]; str2[num] = 0; printf("%s",str2); return 0; }