1.

Which one is always faster in writing on C++?(a) Writing to a file(b) Writing to memory(c) Reading from the network(d) Deleting a fileI got this question during an interview.The doubt is from Buffering in section Strings, Streams & Numerics in C++ of C++

Answer»

Correct choice is (b) Writing to MEMORY

The EXPLANATION is: For the stand of file operations, writing to memory (RAM) is always FASTER than writing to the file on the DISK directly.



Discussion

No Comment Found

Related InterviewSolutions