以下是问题程序 #include"stdio.h" void main() { char str1[100],*P=str1,*q=str1; printf("请输入一串字符"); scanf("%s",str1); for(;*q!='\0';q++) ; q-1;/*使p指向最后一个元素而不是结束符*/ for(;p { *p=*q; q--; p++; } printf("%s\n",str1); } 想要倒序输出 但总是有个报错 不是很明白 希望得到修改 谢谢