The function printf is used to print output to the screen. An example is
printf("hello world\n");
In between the double quotes is the character string which is printed
on the screen.
Special character strings include the \n in the double quotes
which corresponds to a newline character.
This advances the line when printing on the screen.
Variables can also be output to the screen. A program segment is shown below.
#include <stdio.h>
main(void)
{
int days;
days = 7;
printf("The number of days in one week is %d\n", days);
return 0;
}
the variable named days is output on the screen using the integer character,
%d.
The output of this program would be:
The number of days in one week is 7
See ABC for other typical special character strings.