Escape sequence in c

An escape sequence begins with a back slash(\n) and is followed by a character in C. An escape sequence is treated as a single character. It is used to alert and format the output in the desired format.

C Escape Sequence Table:-

Some escape sequences are given below.

Escape SequenceMeaning
\nSends the cursor to the next line.
\tHorizontal Tab
\aAlert( Used to generate beep)
\cCarriage return(sends the cursor to the beginning of the current line)
\bbackspace(sends the cursor one character to the left)
\’prints the single quotation mark
\’’prints the double quotation mark
\\prints the backslash character
\?prints the question mark

Recommended Post: