Concept
How should you close files in C?
ComputerScienceOne / Closing Files
"Once you are done processing a file, you should close it using the fclose() function:\n\nint fclose(FILE *fp);\n\nwhich takes a single argument, the FILE pointer of the file you wish to close. Closing an invalid file may result in an error or segmentation fault. In any case, after a file has been closed, it cannot be read from or written to, doing so is undefined behavior. Failure to close a file may result in a corrupted file."
Related Ideas
- How can PHP use URLs as file names?ComputerScienceOne · Closing Files
- How does try-with-resources simplify closing file input resources?ComputerScienceOne · File Input
- How can you write binary data to an output file?ComputerScienceOne · File Output
- How does PHP handle file input and output?ComputerScienceOne · Opening Files
- What is 22?ComputerScienceOne · Opening Files