C – Escape Characters

Escape Sequences: Performs specific action when we use inside the String.

\bBackspace
\nNew line
\rCarriage return
\tHorizantal tab
\vVertical tab
\\Backslash
\’Single quote
\”Double quote
\0Null

Display String in multiple lines:

#include<stdio.h>
int main ()
{
            printf(“String \ndisplayed \nin \nMultiple \nLines”);
            return 0;
}

Display information with tab spaces:

#include<stdio.h>
int main ()
{
            int a=10, b=20, c=30;
            printf(“%d\t%d\t%d”, a, b, c);
            return 0;
}

Display Message with Single Quotations:

#include<stdio.h>
int main ()
{
            printf(“‘C’ Tutorial\n”);
            return 0;
}
#include<stdio.h>
int main ()
{
            printf(“\’C\’ Tutorial\n”);
            return 0;
}

Display Message with Double Quotations:

int main ()
{
            printf(“\”C-Language\” Tutorial\n”);
            return 0;
}
Scroll to Top