This section focuses on how to open and close a disk data file and how to interpret the error messages that can be returned by these two functions.
FILE
The FILE
structure is the structure that controls files
and it is defined in the header file stdio.h
. A file
pointer is used by a stream to conduct the I/O functions. The following
defines a file pointer:
FILE *f_ptr;
In the FILE
structure there is a member which represents
the file position indicator.