Essay
What output is sent to the file out.dat by the following code,assuming these lines of code are embedded in a correct program?
ofstream fout;
fout.open("out.dat");
fout << "*" << setw(5)<< 123 << "*"
<< 123 << "*" << endl;
fout.setf(ios::showpos);
fout << "*" << setw(5)<< 123 << "*"
<< 123 << "*" << endl;
fout.unsetf(ios::showpos):
fout.setf(ios::left);
fout << "*" << setw(5)<< 123 << "*"
<< setw(5)<< 123 << "*" << endl;
Correct Answer:

Verified
Using g++,output sent to out.d...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q9: A file is automatically closed when a
Q10: A stream is a flow of data
Q11: What will be the output from
Q12: Declare and open input file stream fileIn
Q13: You have a file that is not
Q15: Write a function that will copy the
Q16: What happens to output when data is
Q17: Setting the width of output with call
Q18: The _ fstream member function closes a
Q19: You have a file that is not