Escape Sequences
Many nonprinting characters, as well as the backslash (\) and the apostrophe ('), could be expressed in terms of escape sequences. An escape sequence always starts within a backward slash and is followed through one or more special characters. For instance, a newline can be referred to as \n. An escape sequences always represent single characters even by they are written in terms of two or more characters. The commonly used escape sequences are listed below: -
Character Escape sequence
bell \a
backspace \b
horizontal tab \t
vertical tab \v
newline \n
carriage return \r
quotation mark \"
apostrophe \'
backslash \\
null \0
An Escape sequences are expressed in terms of character constants that are as follows: -
' \t ', ' \n ', ' \" ', ' \' ', ' \0 '
Particular interest is the escape sequence \0. That will represent the null character that is used to signify the end of a string. Null character is not equal to the character constant ' 0 '.