加不加括号为何变化这么大,求大神喷
#include<stdio.h>#include<string.h>
void fun(char *s)
{
int i,j,s1;
char t;
s1=strlen(s);
for(i=s1-1,j=0;j<=i;j++,i--)
{
t=s[i];
s[i]=s[j];
s[j]=t;
}
}
main()
{
char b[10]="ABCD";
printf("还是不变的好:%s\n",b);
fun(b);
printf("变成这样了:%s\n",b);
}