Your Ad Here

Tuesday, August 19, 2008

EXAMPLE

For example, the following program outputs a new line and a tab and then prints the string This is a
test.
#include
int main(void)
{
printf(''\n\tThis is a test.");
return 0;
}
Code Meaning
\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Horizontal tab
\" Double quote
\' Single quote
\ \ Backslash
\v Vertical tab
\a Alert
\? Question mark
\N Octal constant (where N is an octal constant)
\xN Hexadecimal constant (where N is a hexadecimal constant)

No comments: