Escape Sequence
Escape sequence is a character constant of special characters.
Table of Escape Sequences
| Escape Sequence |
Description |
| \0 |
null |
| \n |
new line |
| \t |
horizontal tab |
| \v |
vertical tab |
| \r |
carriage return |
| \f |
form feed |
| \b |
backspace |
| \a |
bell |
| \" |
double quote |
| \' |
single quote |
| \\ |
backslash |
| \ddd |
octal number |
| \xddd |
hexadecimal number |
Escape Sequence Examples
char c = '\0';
char c2 = 0;
// c2 = c = 0
printf("Line1 text\nLine2 text"); // \n is used
for new line