如题所述
ä¸ä¸ªå¾ªç¯
for (int i = 0, j = strlen(s) - 1; i < j; i ++, j --) {
char c = s[i]; s[i] = s[j]; s[j] = c;} // for i, j
for (int i = 0, j = strlen(s) - 1; i < j; i ++, j --) {
char c = s[i]; s[i] = s[j]; s[j] = c;} // for i, j
温馨提示:答案为网友推荐,仅供参考