Answer the following statements true (T) or false (F)
1. When you call the setf function on an output stream, the effect is only until the next output.
2. Setting the width of output with call to the width member function, affects only the next output.
3. Setting the width of output with the manipulator setw is different from setting the width with the width member function.
4. If the output is too wide for the width specified in a setw manipulator or a call to the width member function, then the output is lost.
1. False
The effect of setting a flag with setf continues until you call unsetf with the same argument to turn this flag off.
2. True
The effect of the width call is ephemeral. It affects the next output operation and then the width is reset to default for the system.
3. False
These are just two ways to call the same function. The setw manipulator passes the address of the width member function to the stream with parameters and the stream knows to execute the function.. Calling the member function width just avoids one step in the process.
4. False
If the output needs more space than you provide in a width member function or a setw manipulator invocation, the output takes all the room it needs. This messes up your formatting but it does output your data, so you can fix things.
You might also like to view...
Which implementation strategy do you recommend Sports Fanatics adopt and why?
What will be an ideal response?
A macro is an action or a set of actions with which you can automate tasks by grouping a series of commands into a single command
Indicate whether the statement is true or false
Which of the following would be an example of fair use?
a. A parody of a dramatic movie. b. Reprinting an art illustration in a advertisement. c. Photographs in a coffee table book. d. Sampling a song and looping it to create a hip hop beat.
Which of the following is POP3 designed to retrieve?
A. instant messages B. email C. web pages D. video conferences