← Quiz: File Handling in C++: all 10 questions
Quiz: File Handling in C++ · Question 1 of 10
Which class do you use to read data from a file?
Which class do you use to read data from a file?
- A.ofstream
- B.ifstream
- C.ostream
- D.iostream only
Answer & explanation
Correct answer: ifstream
ifstream is the input file stream, the file version of cin.
Can you get the rest right without peeking?
Take the timed Quiz: File Handling in C++ quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →