Wednesday 1 March 2017

Escape characters in C++ language

Escape (Backslash) character Constants
In C++ there are some special backslash characters are available for specific meanings. These are used in output purpose. For example ‘\n’ is used for newline on the output. The following list shows the available backslash characters in C++:
Constants
Description/ use
‘\a’
Alert bell
‘\b’
Back space
‘\f’
Form feed
‘\n’
New line
‘\r’
Carriage return
‘\t’
Horizontal tab
‘\v’
Vertical tab
‘\’’
Single quote
‘\”’
Double quote
‘\?’
Question mark
‘\\’
Backslash
‘\0’
Null


No comments:

Post a Comment