For each of the I/O functions in the preceding chapters, there is a similar file I/O function. The main distinction is that you need to use a FILE pointer to tell the new functions with which file to work. Like getc() and putc(), these functions require that you identify a file by using a pointer-to-FILE such as stdout or that you use the return value of fopen().
The file I/O functions fprintf() and fscanf() work just like printf() and scanf(), except that they require an additional first argument to identify the proper file. You've already used fprintf(). Listing 13.3 illustrates both of these file I/O functions along with the rewind() function.