1.

Which of the following is the default mode of the opening using the ofstream class?(a) ios::in(b) ios::out(c) ios::app(d) ios::truncThe question was posed to me during an interview for a job.My question is based upon File Handling topic in division Strings, Streams & Numerics in C++ of C++

Answer»

Correct OPTION is (B) ios::out

Explanation: By default, the FILE is opened in ios::out mode if the file object we are USING is of ofstream class.



Discussion

No Comment Found

Related InterviewSolutions