Utility Functions and C Language Reference > C Language Reference > Alphabetical List of Functions > fprintf

fprintf

Example: fprintf Input-Output Functions

Writes formatted output to a file.

int fprintf( FILE *file_pointer, const char *format_string [, args ] );

file_pointer A pointer to a file.
format_string The formatted string to write to the file.
args One or more optional print arguments.

Return Values

On success, returns the Total number of characters printed. On error, returns a negative number.

For fprintf details, refer to your C language documentation.