The fclose() function is used for closing the file. Here is its syntax:
int fclose(FILE *file_pointer)
Here, file_pointer represents the file pointer that is pointing at the open file.
The function returns a 0 value if the file is successfully closed.