Example:
printf("Hello there!");
|
|
|
| \n | newline |
| \t | tab |
| \" | double quote |
| \' | single quote |
| \? | question mark |
| \\ | backslash |
#include <stdio.h>
int main() {
int year = 1999;
printf("This program was written in %d.\n", year);
return 0;
}
|
| Source File | DOS Executable (run from DOS prompt) |
|
|
#include <stdio.h>
int main() {
int year;
printf("Please enter the year>");
scanf("%d", &year);
printf("\n\nThe current year is %d.\n", year);
return 0;
}
|
| Source File | DOS Executable (run from DOS prompt) |