i2tutorials

Files

Files

 

Definition:

 

File is a predefined structure data type which is defined in library file called stdio.h. (or) A File is a set of records that can be accessed through a set of library functions.

 

Syntax:

 

 FILE *filepointerobject;

 

Example:

 

 FILE *fp; // where FILE is a keyword and “fp” is a file pointer object.

 

C supports a number of functions that can perform basic file operations, including:

  1. Naming a file
  2. Opening a file
  3. Reading from a file
  4. Writing data into a file
  5. Closing a file

 

File operation functions in C:

 

Files

 

 

Exit mobile version