The printf()
function can do much more than simply
output a
string constant.
It can also
format and
insert strings and other
variables into the output string by putting format specifiers into the format arg (the first one), then passing the variables you want to substitute for the format specifiers in the order that you want them to be used. %d (%i) is for int's, %c is for char's, %s is for strings (char* or char
's), %f is for float's.
Example: printf( "num = %d" , num );
Example: printf( "string = %s", string );
Example: printf( "char 1 is %c and char 2 is %c", char1, char2 );
printf() is declared in stdio.h.