Next: Formatted Input Output Up: Input and Output Previous: Character Input and

Formatted Input Output with File Pointers

Similarly there are equivalents to the functions printf and scanf which read or write data to files. These are called fprintf and fscanf. You have already seen fprintf being used to write data to stderr.

The functions are used in the same way, except that the fprintf and fscanf take the file pointer as an additional first argument.


craa27@strath.ac.uk
Tue Jan 17 11:40:37 GMT 1995