ESCAPE SEQUENCE
Lecture 1.4
Prepared by: MianSaeed Akbar
REF:
ESCAPE SEQUENCE
An escape sequence is a combination of characters that has a meaning other than the
literal characters contained therein
In C++ escape sequence is composed of a backslash (\) and an escape sequence
character
Escape sequences are used in strings
For example to produce a beep sound
cout<<"\a";
ESCAPE SEQUENCE
Escape Sequence Description
\n Newline. Position the screen cursor to the
beginning of the next line.
\t Horizontal tab. Move the screen cursor to the next
tab stop.
\r Carriage return. Position the screen cursor to the
beginning of the current line; do not advance to
the next line.
\a Alert. Sound the system bell.
\\ Backslash. Used to print a backslash character.
\" Double quote. Used to print a double quote
character.
Thank you
Please subscribe my channel for more videos
and courses