A) while (!theFile.eof()) B) while (theFile.eof == true) C) while (theFile !eof)
ID: 3548471 • Letter: A
Question
A) while (!theFile.eof())
B) while (theFile.eof == true)
C) while (theFile !eof)
D) while (theFile.eof != false)
Question 2: Which of the following is not true about files?
A)C++ views each file as a sequential stream of bytes.
B) Files are opened by creating objects of stream classes.
C) Member functions of stream objects can be applied to file streams.
D)istream, ostream, and iostream are derived from ifstream, ofstream, and fstream, respectively.
ifstream theFile;
When using a loop to read lines from a sequential file, what would be the proper loop condition?
Explanation / Answer
1. (C)
2. (B)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.