Close File >> fclose function >> File Handling >> stdio.h

January 29, 2010 No Comments » Hits : 168





Closing a File >> fclose function >> File Handling
fopen function :

  1. After performing all Operations , FILE is no longer needed 
  2. File is closed using fclose function
  3. All information associated with file is flushed out of buffer
  4. Prevent misuse of FILE

Syntax :

int fclose(FILE *fp);

Example :

fclose(fptr);

Return Type :

Action Return Value
On Success0
On ErrorNULL

Incoming search terms: