Escape Sequence in C

Facebooktwitterredditpinterestlinkedinmailby feather

An escape sequence is a sequence of character that used inside the string literal or character.  All the escape sequence is used with the backslash (\) symbol.

The list of an Escape sequence is as follows:

Escape Sequence Meaning
\a Alarm or Beep
\b Backspace
\f Form Feed
\n New Line
\r Carriage Return
\t Tab (Horizontal)
\v Vertical Tab
\\ Backslash
\’ Single Quote
\” Double Quote
\? Question Mark
\nnn octal number
\xhh hexadecimal number
\0 Null

Let us consider an Example

Output
Facebooktwitterredditpinterestlinkedinmailby feather

Leave a Comment