C Language Escape Sequences

When you're programming in the C language, sometimes you need to refer to a key press that doesn't result in a specific character. Other times, you need to refer to a specific character literally that normally has a different meaning in C. In either case, you need an escape sequence. The following table lists the escape sequences you need to program in the C language.


Escape sequences always begin with a backslash.































































Escape SequenceCharacter
\aBell (speaker beeps)
\bBackspace (non-erase)
\fForm feed/clear screen
\nNew line
\rCarriage Return
\tTab
\vVertical tab
\\Backslash
\?Question mark
\'Single quote
\"Double quote
\xnnHexadecimal character code nn
\onnOctal character code nn
\nnOctal character code nn










dummies

Source:http://www.dummies.com/how-to/content/c-language-escape-sequences.html

No comments:

Post a Comment