Escape Sequences and Comments in C
What are Escape Sequences?
Escape sequences are special character combinations starting with a backslash \ used to represent characters that can't be typed directly, such as a new line or a tab.
Common Escape Sequences
\n— new line\t— horizontal tab\\— backslash\'— single quote\"— double quote\0— null character\r— carriage return
printf("Name:\tJohn\nAge:\t25\n");
Comments in C
Comments are ignored by the compiler and used to explain code.
// Single-line comment
/* Multi-line
comment */
Ready to master real-world C Programming development?
Learn C Programming hands-on with mentor-led, live sessions.
.png)