Multiple choice general knowledge science & technology

Which of the following are Stream classes in C++?

  1. ios

  2. fstream

  3. ostream

  4. All the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In C++, ios is the base class for all I/O stream classes, fstream handles file input/output operations, and ostream is the base class for output streams. Since all three (ios, fstream, and ostream) are legitimate stream classes in C++'s I/O hierarchy, option D is the correct choice. This question tests knowledge of the C++ stream class hierarchy.