C Basics

Escape Sequence

User Rating:  / 2
PoorBest 

Escape Sequence

 

There are certain characters in C when they are proceeded by a back slash they will have special meaning.

 

Following is the example to show few escape sequence characters:

 

Esc. Seq

    Description

  Esc. Seq

Description

\n

New Line

\t

Tab

\b

Backspace

\r

Carriage Return

\f

Form feed

\a

Alert

\’

Single Quote

\”

Double Quote

\\

Backslash

\v

Vertical Tab

 

#include <stdio.h>
int main()
{
   printf("Hello\tWorld\n\n");
   return 0;
}

Output: - Hello    World

                                                                                          About Us  ||  Contact Us  ||  Terms & Conditions  ||  Privacy Policy 

Referral Banners