Which of the following sets of statements will set floating point output to the stream outStream to fixed point with set 3 places of decimals? In the explanation, you must give any necessary #include directives and using directives or declarations.
a. outStream.setf(ios::fixed);
outStream.setf(ios::showpoint);
outStream.precision(2);
b. outStream.setf(ios::fixed | ios::showpoint);
outStream << setprecision(2);
c. outStream << setflag(ios::fixed);
outStream << setflag(ios::showpoint);
outStream << setprecision(2);
d. outStream.flags(ios::fixed);
outStream.flags(ios::showpoint);
outStream.precision(2);
a) and b) work if you #include
Explanation: c) is an incorrect use of manipulators and non-manipulators. d) is a misuse of the flags member function.
You might also like to view...
The ________ statement passes a value back to a function’s caller.
a. recover b. restore c. pass d. return
All of the following are pros of using Shockwave EXCEPT ____.
A. Shockwave movies tend to process complex code faster than Flash movies B. Shockwave files tend to be smaller than Flash files because the files are prerendered C. Shockwave movies look the same across browsers and platforms D. Shockwave movies can display a wide range of media formats
________ is a basic word processing program that includes formatting and graphic capability and is a part of Windows 7
Fill in the blank(s) with correct word
In virtualized computing, a single computer is capable of supporting a single operating system.
Answer the following statement true (T) or false (F)