Closes a stream file.
#include <stdio.h>
int fclose (
FILE *fp);
(IN) Points to the file to close.
If successful, returns 0. Otherwise, returns EOF and sets errno to one of the following:
The fclose function closes the file pointed to by fp. If there is unwritten buffered data for the file, it is written before the file is closed. Unread buffered data is discarded. If the associated buffer was automatically allocated, it is deallocated.