C – Escape Sequence

Home/Learn C Programming/C – Escape Sequence
C – Escape Sequence 2017-08-05T14:01:15+00:00

Escape sequence characters :

C uses some backslash characters in output functions for formatting the output. These characters are called as Escape sequence characters. In these characters it consists of two characters ,But it is treated as  a single character.

\n  –  new line

\t  –  horizontal tab(default 8 spaces)

\v  –  vertical tab(default 1 line)

\b  –  back space

\a  –  alert(beep sound)

\r   – Carriage return

\f   – form feed

\0  – null

\”   – double quotes

etc.

C – ESCAPE SEQUENCE EXAMPLE PROGRAM :

Output:

Welcome

Good Morning

C – EXAMPLE PROGRAM USING BACKSPACE :

Output:

WelcomGood Morning

C – EXAMPLE PROGRAM USING CARRIAGE RETURN :

Output:

Welcomerning

 

Prev Next