I am a newbie in C and have this question with char pointer;
char * s = "hello world"; *(s+1) = 'a';
This is throwing a segfault error. Should'nt this work since I am modifying only one memory location. Also I have seen such code on the net. I am using GCC compiler.