Read-Only Memory (code example) The following code will cause a SEGV signal in instruction '1': int main() { const char* s = "hello world"; char* p = (char*)s; p[0] = 'a'; /* '1' */ return 0; } The following code won't crush (but is still written with bad style): #include /* for 'strdup()' */ int main() { const char* s = strdup("hello world"); char* p = (char*)s; p[0] = 'a'; return 0; }