When a character is preceded by a backslash (\) it is called an escape sequence.
For example, \n represents the new line.
Escape sequence | Meaning |
---|---|
\a | Alarm or beep |
\b | Backspace |
\f | Form feed |
\n | Newline |
\r | Carriage return |
\t | Tab(horizontal) |
/v | Vertical Tab |
\' | Single Quote |
\\ | Blackslash |
\? | Question Mark |
\" | Double Quote |
Now,let’s see the example of escape sequence:
//escape sequence
#include<stdio.h>
int main(){
printf("hey there!\nhere we are learning the C with\nprosequence.tech");
}
Outputhey there!
here we are learning the C with
prosequence.tech