C Escape Sequence or Backslash Character

In C Programming Language escape sequence is a special string comprise a backslash (\) followed by a letter or by a combination of digits used to control output on monitor. Escape sequences are typically used to represent actions such as newline,carriage returns,tab movements and non printing characters over the monitor. The following table lists the common ANSI escape sequences and their meaning.

Escape Sequence Represents
\a Bell (alert)
\b Backspace
\f Formfeed
\n New line
\r Carriage return
\t Horizontal tab
\v Vertical tab
\’ Single quotation mark
\ " Double quotation mark
\\ Backslash
\? Literal question mark
\ ooo ASCII character in octal notation
\x hh ASCII character in hexadecimal notation
\x hhhh Unicode character in hexadecimal notation if this escape sequence is used in a wide-character constant or a Unicode string literal.