#include#include char* f(char*s){ int len=strlen(s); char* p=s; char *q=s+len-1; char t; while (p { t=*p;*p=*q; *q=t; ++p; --q; } return s;}//测试int main() { char str[]="abc"; printf("%s", f(str)); return 0;}
{ t=*p;*p=*q; *q=t; ++p; --q; } return s;}//测试int main() { char str[]="abc"; printf("%s", f(str)); return 0;}