Skip to content

Instantly share code, notes, and snippets.

@hectoregm
Created November 15, 2011 19:30
Show Gist options
  • Save hectoregm/1368066 to your computer and use it in GitHub Desktop.
Save hectoregm/1368066 to your computer and use it in GitHub Desktop.
C Escape Sequences
Escape Sequence Name Meaning
\a Alert Produces an audible or visible alert.
\b Backspace Moves the cursor back one position (non-destructive).
\f Form Feed Moves the cursor to the first position of the next page.
\n New Line Moves the cursor to the first position of the next line.
\r Carriage Return Moves the cursor to the first position of the current line.
\t Horizontal Tab Moves the cursor to the next horizontal tabular position.
\v Vertical Tab Moves the cursor to the next vertical tabular position.
\' Produces a single quote.
\" Produces a double quote.
\? Produces a question mark.
\\ Produces a single backslash.
\0 Produces a null character.
\ddd Defines one character by the octal digits (base-8 number). Multiple characters may be defined in the same escape sequence, but the value is implementation-specific (see examples).
\xdd Defines one character by the hexadecimal digit (base-16 number).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment