cppreference.com -> Escape Sequences

Constant Escape Sequences

The following escape sequences can be used to print out special characters.

Escape SequenceDescription
\'Single quote
\"Double quote
\\Backslash
\0Null character
\aAudible bell
\bBackspace
\fFormfeed
\nNewline
\rCarriage return
\tHorizontal tab
\vVertical tab
\xnnnHexadecimal number (nnn)

An example of this is contained in the following code:

printf( "This\nis\na\ntest\n\nShe said, \"How are you?\"\n" );

which would display

This
is
a
test

She said, "How are you?"