Which of the following stream classes is suitable for both reading and writing operations? 

  • ifstream 
  • ofstream 
  • fstream 
  • sstream
The "fstream" class in C++ is suitable for both input and output operations. This means you can use it for both reading from and writing to files. In contrast, "ifstream" is specifically for input (reading) and "ofstream" is for output (writing).
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *