fprintf()

Syntax
  #include <stdio.h>
  
  int fprintf(FILE *f, const char *format,...);

  
Description

fprintf() is the same as sprintf(), but the output goes to file f instead of a string.

For a detailed format description see sprintf().

Return

The number of characters written. If some error occurs, fprintf() returns EOF.

See also

printf() and

vfprintf(), vprintf(), and vsprintf()