Escape sequences are combinations of characters that have meanings other than their literal representation. An escape sequence in C++ starts with a backslash and is followed by a character that indicates the escape sequence. Common escape sequences include \n for newline, \t for tab, \r for carriage return, and \a to beep. Escape sequences are often used within strings.
2. 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";
3. 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.