C Language Escape Sequences

Programming in C is fast — all you have to do is type a short sequence of keystrokes — generally just two — to get a tab, a new line, a question mark, and more. The following table shows the sequences you need to accomplish a variety of tasks:































































SequenceRepresents
\aThe speaker beeping
\bBackspace (move the cursor back, no erase)
\fForm feed (eject printer page; ankh character on the
screen)
\nNewline, like pressing the Enter key
\rCarriage return (moves the cursor to the beginning of the
line)
\tTab
\vVertical tab (moves the cursor down a line)
\\The backslash character
\’The apostrophe
\”The double-quote character
\?The question mark
\0The “null” byte (backslash-zero)
\xnnnA character value in hexadecimal (base 16)
\XnnnA character value in hexadecimal (base 16)








dummies

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

No comments:

Post a Comment