Escape Sequences

In C,  some character cannot displayed like other normal character such as newline, tab, backspace. C supports the combination of backslash ( \ ) and some character from C character set. This combination of character are known as escape sequences.

Some escape sequences are used in C program.

Escape
sequences
MeaningASCII
value
Purpose
\bbackspace008Moves the cursor to the previous position of the current line.
\nnewline010Move the cursor to beginning of the current line.
\rcarriage return013Move the cursor to the initial position of the next logical page.
\aalert007produces an audible or visible alert.
\fform feed012Move the cursor to next vertical tab position.
\0null character000Used for termination of character string.
\vvertical tab011Moves the cursor to next vertical tab position.
\tHorizontal tab009Moves the cursor to the next horizontal tab position. 
\\backslash092Presents a character with backslash.

Blank, horizontal tab, vertical tab, newline, carriage return, form feed are known as white-space in C language.

Trigraph character

In C, some keyboards not have all the characters from C character set. C support trigraph sequence to print these characters. Trigraph sequences have three character the first two character “??” and third character form C character set.

Some trigraph sequences used in C program are:

Trigraph
sequence
Symbols
??<{ left brace
??>} right brace
??([ left bracket
??)} right bracket
??!| vertical bar
??/\ backslash
??=# hash sign
??-~ tiled
??’^ caret

Delimiters

Delimiters are used for syntactic purpose in C program.

:colonused for label
;semicolonused for statement
( )parenthesesused for expression
[ ]square bracketsused for arrays
{ }curly bracketsused for block of statement
#hashpreprocessor directive
.commavariable delimiter