楼主的代码测试有内存读写错误, 估计是指针处理有问题.
10楼代码可以运行, 没有报错.
10楼代码可以运行, 没有报错.

代码测试环境: WinXP+C-Free5.0.
程序代码:#include <stdio.h>
#include <string.h>
void rese(char* source,int i,int j){
if(i<j){
char t=source[i];
source[i]=source[j];
source[j]=t;
i++;j--;
rese(source,i,j);
}
}
int main()
{
char test[]="This is a test text.";
int i=strlen(test);
rese(test,0,i-1);
printf("%s\n",test);
return 0;
}
