Q266
What will be the output of the following C++ code? #include #include using namespace std; int main () ofstream outfile ("test.txt"); for (int n = 0; n < 100; n++) outfile << n; outfile.flush(); cout << "Done"; outfile.close(); return 0;
A.
Done
AnswerB.
Error
C.
Runtime error
D.
DoneDoneDone
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board