fprintf

Print formatted data to a stream.

int fprintf (FILE * stream, char * format [, arguments]...);

Required Header
<stdio.h>

Return Value

This function returns the number of characters printed to the stream. -1 indicates an error.

Parameters

stream

  A pointer to the open FILE structure

format

  The format control string

arguments

  Optional arguments

Remarks

The fprintf function prints formatted data to the stream based on the same rules of the printf function, using the optional arguments as specified by the format string.

Stream I/O Routines

See Also    fread, fscanf, fwrite, printf, sprintf, vfprintf