Standard C++ Library Reference ISO/IEC (VERSION3)

Mnemonic escape sequences help you remember the characters they represent:
Character Escape Sequence
" \"
' \'
? \?
\ \\
BEL \a
BS \b
FF \f
NL \n
CR \r
HT \t
VT \v
Numeric Escape Sequences
You can also write numeric escape sequences using either octal or hexadecimal digits. An
octal escape sequence takes one of the forms:
\d or \dd or \ddd
The escape sequence yields a code value that is the numeric value of the 1-, 2-, or 3-digit octal
number following the backslash (\). Each d can be any digit in the range 0-7.
A hexadecimal escape sequence takes one of the forms:
\xh or \xhh or ...
The escape sequence yields a code value that is the numeric value of the arbitrary-length
hexadecimal number following the backslash (\). Each h can be any decimal digit 0-9, or any
of the letters a-f or A-F. The letters represent the digit values 10-15, where either a or A has
the value 10.
A numeric escape sequence terminates with the first character that does not fit the digit pattern.
Here are some examples:
You can write the null character as '\0'.
You can write a newline character (NL) within a string literal by writing:
"hi\n" which becomes the array
{'h', 'i', '\n', 0}