Tagged: file closing operation in C

Closing the File in C 2

Closing the File in C

Once we open a file, finished reading from the file, we need to close the file. This is done using the function fclose() through the statement: fclose(fp); Once we are done with closing the file, we can no longer read, write or perform any operation on the file unless we reopen it. ¬†Note that to close the file, we don’t use the filename but the file pointer fp. On closing the file, the buffer associated with the file is removed from memory. While performing a write operation on a file, when we try to close the file using fclose(), three...

FREE C Programming Cheatsheet

FREE C Programming Cheatsheet


Cheatsheet for a quick glance at C programming concepts and syntax

Thank you! Check you inbox and access your cheat-sheet