• The escape sequence characters are also called as backslash character constants.
• These are used for formatting the output.
• The escape sequence characters are
\a audible bell
\b back space
\f form feed
\n new line
\r carriage return
\t horizontal tab
\v vertical tab
\\ back slash
\0 null character
\’ single quote
\” double quote
\000 octar number
\xhh hexadecimal number
• Characteristics
1) Although it consists of two characters, it represents single character.
2) Every combination starts with back slash(\)
3) They are nonprinting characters.
4) It can also be expressed in terms of octal digits or hexadecimal sequence
5) Each escape sequence has unique ASCII value.
6) Escape sequence in character constants and string literals are replaced by their equivalent and then adjacent string literals are concatenated.
• These are used for formatting the output.
• The escape sequence characters are
\a audible bell
\b back space
\f form feed
\n new line
\r carriage return
\t horizontal tab
\v vertical tab
\\ back slash
\0 null character
\’ single quote
\” double quote
\000 octar number
\xhh hexadecimal number
• Characteristics
1) Although it consists of two characters, it represents single character.
2) Every combination starts with back slash(\)
3) They are nonprinting characters.
4) It can also be expressed in terms of octal digits or hexadecimal sequence
5) Each escape sequence has unique ASCII value.
6) Escape sequence in character constants and string literals are replaced by their equivalent and then adjacent string literals are concatenated.
No comments:
Post a Comment