Your code is equivalent to p[1][2]='A';
i.e. it wants to set the third char in the second string.
But since the strings are string literals they are immutable and you get undefined behavior when you try to modify their content. In particular they can be located in readonly memory. In which case you get an access violation.
Typically an executable file consists of different sections for code, global variables and constants. The executable gets mapped into the process and the memory access privileges get set to what's declared in the executable. Typically code is set to ReadExecute, global variables to ReadWrite and Constants to Read.
The CPU then enforces these memory access settings(Execute only on 64 bit CPUs). You can manually change the protection of memory using VirtualProtect. Note that it only has page granularity.