char *p = "hello";
char pArr[] = "Hello";
The above two are not the same. When you declare it as a pointer and initialize it with a value, the compiler puts it in the
Data Segment[
^], AND in the "Initialised and read only" area. When you try to change contents stored in this section, it should blow up (that's what you're experiencing).
However, the latter one is just an array (the contents are stored in the code executing thread's stack) and therefore the contents can be changed as you wish.