This is generally true, except ion many embedded systems, where the static allocation to a pointer will end up in the constant, non volatile (that is, non-modifiable ROM) memory. In that case it could give either a complile error, or a runtime error if the compiler is not good enough to catch th modification of nonvolitile memory
paulson paul chambakottukudyil
Apr 18th, 2006
It will give a run time error.
Anup Kumar Saha
Nov 6th, 2006
hi...all.......this program will show segmentation fault.
Main(){ char *p = "hello world"; p[0] = 'H'; printf("%s", p);}
B) “Hello world”
C) Runtime error.
D) “hello world”