Technology Software

How to Close Files in C

    • 1). Right-click the C source code file you want to edit and select "Open With." Click the C compiler you want to use to edit the code.

    • 2). Locate the part of the file that uses the C file handlers. You place the "fclose" function at the very end of the function that opens the file.

    • 3). Type the following code to close a file handler:

      int response;

      response = fclose( file );

      Replace "file" with your own file variable. The "response" variable contains a success integer, which is a zero. If the file does not close, an error number is returned.

Related posts "Technology : Software"

How to Put My FB to Sleep

Software

Some Useful Tips to Avoid Hack Attacks

Software

CREN

Software

How to Transfer DVD to 3GP

Software

How to Troubleshoot if My Computer Only Types in Wingdings

Software

What Cloud Computing Really Means

Software

How to Make More Points Visible on Scatter Plots in Excel for Mac

Software

How to Make a Spreadsheet Without Excel

Software

Enhancing VOB Videos to MPEG Format

Software

Leave a Comment