Which function is used to close a file in C?
Show answerHide answer
Correct answer: (B) fclose()
Explanation
fclose(fp) closes a file opened with fopen and flushes its buffers. close() is the low-level POSIX call on file descriptors, not the standard C file function.