思路 第一个for循环是让指针p指向到字符串末尾的‘\0’上,第二个for循环先将p指针向前挪一位,然后输出。 代码 #include<stdio.h> int main() { char *p,*q="hellow world"; for(p=q;*p!='\0';p++){} for(p--;p>=q;p--) putchar(*p); printf("\n"); return 0; }