title | ms.custom | ms.date | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Storage of String Literals | Microsoft Docs |
11/04/2016 |
|
article |
|
|
ba5e4d2c-d456-44b3-a8ca-354af547ac50 |
9 |
mikeblome |
mblome |
ghogen |
The characters of a literal string are stored in order at contiguous memory locations. An escape sequence (such as \\ or \") within a string literal counts as a single character. A null character (represented by the \0 escape sequence) is automatically appended to, and marks the end of, each string literal. (This occurs during translation phase 7.) Note that the compiler may not store two identical strings at two different addresses. /GF forces the compiler to place a single copy of identical strings into the executable file.
Microsoft Specific
Strings have static storage duration. See Storage Classes for information about storage duration.
END Microsoft Specific