fprintf
Writes output to a stream under format control
#include <stdio.h> int fprintf ( FILE *fp, const char *format, ... );
The fprintf function returns the number of characters written or a negative value if an output error occurred. If an error occurs, errno is set.
The fprintf function writes output to the file pointed to by fp under control of the argument format. The format string is described under the description of the printf function.
#include <stdio.h> main () { char *weekday = {"Saturday"}; char *month = {"April"}; fprintf (stdout, "%s, %s %d, %d\n", weekday, month, 18, 1991); }
produces the following:
Saturday, April 18, 1991