Escape sequence is a character constant of special characters.
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 |
char c = '\0';
char c2 = 0; // c2 = c = 0
printf("Line1 text\nLine2 text"); // \n is used for new line