1.

By using which function does the buffer are automatically flushed?(a) fopen(b) copy(c) compare(d) fcloseThis question was addressed to me in an interview.This intriguing question originated from Buffering topic in division Strings, Streams & Numerics in C++ of C++

Answer» CORRECT option is (d) fclose

The best I can EXPLAIN: fclose() is used to close the file and FLUSH it out of memory for safe CLOSING of FILES opened during the execution of program. In short to avoid memory faults during the execution of the program.


Discussion

No Comment Found

Related InterviewSolutions