December 2006
Beginner
1500 pages
55h 41m
English
Most literal characters to be printed in a printf statement can simply be included in the format string. However, there are several “problem” characters, such as the quotation mark (") that delimits the format string itself. Various control characters, such as newline and tab, must be represented by escape sequences. An escape sequence is represented by a backslash (\), followed by an escape character. Figure 29.23 lists the escape sequences and the actions they cause.
| Escape sequence | Description |
|---|---|
| \' (single quote) | Output the single quote (') character. |
| \" (double quote) | Output the double quote (") character. |
| \\ (backslash) | Output the backslash (\) character. |
| \b (backspace) ... |
Read now
Unlock full access