The class that in C++ for file input is
-
a) ifstream
-
b) ofstream
-
Both a and b
-
none of the above
A
Correct answer
Explanation
ifstream is the C++ standard library class specifically designed for reading input from files. ofstream is for output (writing files), making ifstream the correct choice for file input operations.