Escape Sequence in C

Escape sequence in C & also the list of all escape sequences

In C programming escape sequences are pre-defined groups of symbols and words, they have special meanings.

  • An escape sequence always starts with \ symbol.
  • The escape sequences are represented by \ symbol followed by any character or symbol.
  • Each escape sequence has their special meanings any they cannot be used in general writing in c programming.
  • Escape sequences can be used for only their special purpose in C programming.
  • For example \n is an escape sequence and it is used for new line.
  • In the below table, we have listed all escape sequences with their special meanings.

List of Escape Sequence in C

Escape Sequenses Meanings
\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Horizontal tab
\" Double quote
\' Single quote
\\ Backslash
\v Vertical tab
\a Alert or bell
\? Question mark
\N Octal constant (N is an octal constant)
\XN Hexadecimal constant (N – hex.dcml cnst)
\0 Null character

Top Points

  • The Escape sequence are reserved set of sequence.
  • The meaning of escape sequencea are predefined by c library, we can not chage it.
  • Escape sequences cannot be used as reqular statement in c programming.



Note: Like the above example, you can use escape sequences as where they required in C programming.

Advertise With Us

We offer sponsored posts and guest posts with do-follow links, back-links, and other advertising services, To advertise email us at ""

© 2021 GDATAMART.COM (All Rights Reserved)