The Character Combination consisting of a backslash '\' followed by a character is called an escape sequence. The escape sequences are used to specify some actions such as carriage return and tab space in terminals or printers. They are also used to represent some non-printable characters suxh as double quotes ( " ) which may have other special meanings in C.
The following escape sequences are supported by C language :
Some of the escape sequences are devices specific. For example, \f and \v have no effect on the screen. But they are used for performing relevant printer operations.
The following escape sequences are supported by C language :
Escape Sequence | Usage |
---|---|
\a | Bell (Alert) |
\b | Backspace |
\f | Form Feed |
\n | New Line |
\r | Carriage Return |
\t | Horizontal Tab |
\v | Vertical Tab |
\' | Single quote |
\" | Double quote |
\\ | Back Slash |
\? | Question Mark |
\0 | Null |
Some of the escape sequences are devices specific. For example, \f and \v have no effect on the screen. But they are used for performing relevant printer operations.
No comments:
Post a Comment