I am going through Kernighan and Richie's text on C . And I came across a statement which I could not exactly reason out .
char *pmessage;
pmessage = "jhjhjh";
The book states that only pointers are involved here . That's fine . Now it states that editing the contents of the string will have undefined behavior . I can understand that the pointer holds the starting address of where the "j" in the string is stored in the memory .
But editing the string will only change the values that are stored in the addresses which are stored in pmessage and its subsequent memory locations /
Why will result in undefined behavior ?