Closes a stream input/output file.
The fclose function closes the stream input/output file indicated by file pointer fp.
If the output file of the stream input/output file is open and data that is not output remains in the buffer, that data is output to the file before it is closed.
If the input/output buffer was automatically allocated by the system, it is released.