C examples for Language Basics:printf
Escape sequence | Description |
---|---|
\n | Represents a newline character |
\r | Represents a carriage return |
\b | Represents a backspace |
\f | Represents a form-feed character |
\t | Represents a horizontal tab |
\v | Represents a vertical tab |
\a | Inserts a bell (alert) character |
\? | Inserts a question mark ( ?) |
\" | Inserts a double quote ( ") |
\' | Inserts a single quote ( ') |
\\ | Inserts a backslash (\) |
#include <stdio.h> int main(void) { printf("Hi there!\n\n\nThis is a test"); printf(" test test test test."); printf("\nmore test.\n\n\n\a\a"); printf("Hey, What was test???\n\n"); printf("\t1.\tA test?\n"); printf("\t2.\tA test?\n"); printf("\t3.\tA test?\n"); printf("\n\t\t\b\btest test test?\n\n"); return 0;/*from w w w.j a va 2 s . com*/ }