Possible Duplicate:
Is it possible to modify a string of char in C?
char *s = "anusha";
Is this like a constant pointer? When i tried to change the character in location 3 by writing s[3]='k'
, it gave me a segmentation fault. So i am assuming it is like pointing to a constant array or s is a constant pointer? Which among the two? Please clarify.