Consider the following code.
int main(void) { char * test = \"abcdefghijklmnopqrstuvwxyz\"; test[5] = \'x\'; printf(\"%s\\n\", test); return EXIT_
Char pointers defined with an initialization value go into a read-only segment. To make them modifiable, you either need to create them on the heap (e.g. with new/malloc) or define them as an array.
Not modifiable:
char * foo = "abc";
Modifiable:
char foo[] = "abc";