Originally Posted by
laserlight
No. I repeat, "a string literal is a sequence of characters surrounded by double quotes". Certainly, the contents of a string literal would be stored physically in memory, but so would the contents of any other string.
The problem is that you are delving into implementation details that can even depend on things like optimisation level. The point is, a string literal is of type const char[N]. Due to the const, trying to assign to the characters of a string literal results in undefined behaviour.
Yes, if the array is an array of non-const char.