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.
Go to Character I/O Go to Index Go to Formatted I/O with Strings