Escape Sequence Characters List

Escape Sequence in C | List of all 15 Escape Characters

List all the escape sequence characters in C or Escape Sequence in C Programming Language. In the ASCII table, the total numbers of character are 256 which is divided into total 3 parts, Printable, Non-printable, and Extended. If we talk about ASCII 7-bits there are a total of 128 characters, of which 95 are printable and 33 are not printable. So if the Escape character is not a part of the ASCII table then the question is what are Escape Sequences?

Escape Sequence in C List
Escape Sequence in C

What is the Meaning of the Escape Sequence in C?

An escape sequence is a sequence of characters that helps to convert some other characters(or escape sequence does not represent itself). for example, it’s impossible to print the newline so we use escape sequences to print the newline by using backslash “\” and character “n” together “\n“.

What is the Escape Character?

We cannot print a newline directly in any programming language(C, C++, Java, and C#) by just hitting the enter key. So here backslash is called “escape character“.

Use escape characters and some other characters combination, we use to print some impossible characters. In c, all escape sequences consist of two or more characters it is a combination of backslash and characters.

List all the Escape Sequence Characters in C

Escape SequenceMeaningExplanation
\aAlarm or BeepA beep sound is generated
\fForm FeedForm Feed page break(Return)
\nNew LineShift the cursor control to the new line
\rCarriage ReturnShift the cursor to the beginning of the current line
\tTab (Horizontal)Shift the cursor to a couple of spaces(Eight blank spaces) to the right in the same line
\vVertical TabVertical Tab
\\BackslashPrint the backslash character
\’Single QuoteDisplay the single quotation mark.
\”Double QuotePrint the double-quotation mark
\?Question MarkDisplay the question mark
\nnnoctal numberRepresent an octal number
\xhhhexadecimal numberRepresent a hexadecimal number
\0NullTermination of the string
Escape Sequence

Escape Sequence For Space in c

\b Escape Sequence For Space in c