Table of contents
What are escape sequence characters in C?
Escape sequences are used to format the data.
It is the sequence of characters.
It starts with symbol ‘\'(backslash).
Ex: '\n'
means newline.
List of escape sequences in C
Escape sequence | Meaning |
\a | Beep |
\b | Backspace |
\f | Form feed |
\n | Newline |
\r | Carriage return |
\t | Tab |
\v | Vertical Tab |
\\ | Backslash |
\' | Single Quote |
\" | Double Quote |
\? | Question Mark |
\nnn | Octal number |
\xhh | Hexadecimal number |
\0 | Null |
Example program
#include<stdio.h>
int main()
{
printf("Hi\tall \n you People are learning \n \"C \" language \n");
return 0;
}
People also ask for
What are escape sequences in C?
Escape sequences are used to format the data. It is the sequence of characters. It starts with symbol ‘\'(backslash).
People also read
- Loops in c programming
- Data types in c
- Varibales in c
- Structure in c programming
- string in c
- String to ascii in c