Escape Sequence

Escape Sequence are spacial symbols prefixed with a back slash "\".
These symbols are used in print to provide a formated output

Escape Sequence Name Meaning
\n New Line Moves the cursor to the first position of the next line.
\t Horizontal Tab Moves the cursor to the next horizontal tabular position
\r Carriage Tab Moves the cursor to the first position of the current line
\a Alert Audiable or Visible alert(Beep Sound)
\b Backspace Moves the cursor back one position
\f Form Feed Moves the cursor to the first position of the next vertical tabular position
\v Vertical Tab Moves the cursor to the next vertical tabular position.
\' Single Quote A single quote
\" Double Quote A double quote
\\ Backshlash Backshlash
\0 nill A null character
\ddd nill Multiple character may be defined in the same escape sequence but the value is implementation specific.
\xdd nill Define one character by the hexadecimal digit.
\? literal quote Literal quotation in octal notation
\000 nill Asci character in octal notation.
\xhh nill Asci character in hexadecimal notation.
\xhhhh nill Unique char in hexadecimal notation

Escape Sequence in c.

In C programming language, there are 256 numbers of characters in character set. The entire character set is divided into 2 parts i.e. the ASCII characters set and the extended ASCII characters set. But apart from that, some other characters are also there which are not the part of any characters set, known as ESCAPE characters.

// C program to illustrate
// \a escape sequence
#include <stdio.h>
int main(void)
{
printf("My mobile number "
"is 7\a8\a7\a3\a9\a2\a3\a4\a0\a8\a");
return (0);
}

Output :-

My mobile number is 7873923408.


Also read this.👇