1.

What is the output of this program?
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
ofstream outfile ("Sample.txt");
for (int num = 0; num < 50; num++)
{
outfile << num;
outfile.flush();
}
cout << "Done successfully";
outfile.close();
return 0;
}

A. compilation Error
B. Runtime Error
C. Garbage value
D. Done successfully
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs