To clear the show plus sign flag but leave the rest of the flags alone, you use the _____________ member function and argument.
a. setf(! ios::showpos);
b. setprecision(ios::showpos);
c. unsetf(ios::showpos);
d. setf(ios::showneg);
e. unsetf(! ios::showneg);
c).
Explanation: Part a) doesn’t do much in my program written to check this. Part b) setprecision is a manipulator, not a member. Part c) clears the flag for ios::showpos. Part d) attempts to do a “double negative” to clear the showpos flag.
You might also like to view...
Which statement below could be used to simulate the outputs of rolling a six-sided die? Suppose randomNumbers is a SecureRandom object.
a. 1 + randomNumbers.nextInt(6); b. 1 + randomNumbers.nextInt(2); c. 6 + randomNumbers.nextInt(1); d. 3 + randomNumbers.nextInt(3);
A dataset is stored in the computer's internal memory while the application is running.
Answer the following statement true (T) or false (F)
A digital copy can save paper and other costs
Indicate whether the statement is true or false
To view two documents side by side, you must have both documents open
Indicate whether the statement is true or false