可以用变量吧!!!
程序代码:
#include <stdio.h> #include <assert.h> void reverse_string(char* string) { char *p, temp; assert(string); for (p = string;*(p + 1);p++); while (p != string && p != string - 1) { temp = *p; *p = *string; *string = temp; p--; string++; } } int main() { char test[] = "ABC"; reverse_string(test); printf ("%s\n", test); return 0; }
[fly]存在即是合理[/fly]