In this tutorial you will learn about the C Escape Sequence and its application with practical example.
In C Programming Language c escape sequence is a special string comprising a backslash (\) followed by a letter or by a combination of digits used to control output on the monitor. C escape sequences are typically used to represent actions such as newline, carriage returns, tab movements, and nonprinting characters over the monitor. The following table lists the common ANSI c escape sequences and their meaning.
Table Of Contents−
| Escape Sequence | Represents |
|---|---|
| \a | Bell (alert) |
| \b | Backspace |
| \f | Formfeed |
| \n | Newline |
| \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. |
