buddy i tried out ur code
char *str="MIKE";
str[0]^=str[4];
printf(" %s",str);

it gives no error... so i dont get it were is ur problem?