UC3M

Telematic/Audiovisual Syst./Communication Syst. Engineering

Systems Architecture

September 2017 - January 2018

9.2.  The basics

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.

9.2.1.  Pointers of 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.