The escape sequence in C represents nongraphic characters (nongraphic characters are those characters that cannot be typed directly from the keyboard, for instance, backspace, tabs, carriage return, etc). An escape sequence is represented by a backslash(\) followed by one or more characters. Escape sequences are beneficial to programmers who want to format the output.
| Escape Sequence | Meaning |
|---|---|
| \a | Alarm or Beep |
| \b | Backspace |
| \f | Form Feed |
| \n | New Line |
| \r | Carriage Return |
| \t | Tab (Horizontal) |
| \v | Vertical Tab |
| \\ | Backslash |
| \’ | Single Quote |
| \” | Double Quote |
| \? | Question Mark |
| \nnn | octal number |
| \xhh | hexadecimal number |
| \0 | Null |
#include <stdio.h>
int main() {
// Write C code here
printf("Hello world\nCoderzpy\tC language");
printf("\"Have a great day!\"");
return 0;
} Hello world
Coderzpy C language
“Have a great day!” Note: also read about Comments in C & Format specifiers in C.
If you like my post please follow me to read my latest post on programming and technology.
https://www.instagram.com/coderz.py/
https://www.facebook.com/coderz.py
Staying up to the mark is what defines me. Hi all! I’m Rabecca Fatima a keen learner, great enthusiast, ready to take new challenges as stepping stones towards flying colors.
A design pattern is a reusable solution to a commonly occurring problem in software design. They…
Factory Method is a creational design pattern that deals with the object creation. It separates…
You are given two singly linked lists that intersect at some node. Your task is…
A builder plans to construct N houses in a row, where each house can be…
Find the length of the longest absolute path to a file within the abstracted file…
You manage an e-commerce website and need to keep track of the last N order…