#include <stdio.h>
int fprintf(FILE *f, const char *format,...);
fprintf() is the same as sprintf(), but the output goes to file f instead of a string.
For a detailed format description see sprintf().
The number of characters written. If some error occurs, fprintf() returns EOF.
printf() and