Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A string literal is a sequence of zero or more multibyte characters enclosed in double - quotes ("xyz", for example). A wide string literal is the same, except prefixed by the letter L (L"xyz", for example).

At compile time, string literals are used to create an array of static storage duration and sufficient length to contain the character sequence and a null-termination character. It is unspecified whether these arrays are distinct. The behavior is undefined if a program attempts to modify string literals but frequently results in an access violation, as string literals are typically stored in read-only memory.

...