Escape sequences
The \n that you put at the end of your strings is an escape sequence. An escape sequence begins with \, which is the escape character. This character tells the compiler that the character that comes immediately after does not have its usual meaning.
The \n represents the new-line character. In printf() statements, you include a new-line character when you want output to continue on a new line. Try removing one of these new-lines and see what happens to your output.
Another escape sequence is \".
You use it when you need to include quotation marks within a literal string.
The escape character tells the compiler to treat the " as part of the literal string and not as an instruction to end the string. Here is an ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access