Vidyalelo
C++ Programming · Q32

File Handling in C++

Programming · C++ Programming · question 32

Q32

What is the difference between fstream and ofstream in C++?

A.
fstream can read and write, ofstream can only write
Answer
B.
ofstream can read and write, fstream can only write
C.
ofstream is used for text files, fstream is used for binary files
D.
fstream is used for text files, ofstream is used for binary files

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board