State whether the following are true or false. If the answer is false, explain why.

1) The stream member function flags with a long argument sets the flags state variable to its argument and returns its previous value.
2) The stream insertion operator << and the stream extraction operator >> are overloaded to handle all standard data types—including strings and memory addresses (stream insertion only)—and all user-defined data types.
3) The stream member function flags with no arguments resets the stream’s format state.
4) The stream extraction operator >> can be overloaded with an operator function that takes an istream reference and a reference to a user-defined type as arguments and returns an istream reference.


1) False. The stream member function flags with an fmtflags argument sets the flags state variable to its argument and returns the prior state settings.
2) False. The stream insertion and stream extraction operators are not overloaded for all user-defined types. The programmer of a class must specifically provide the overloaded operator functions to overload the stream operators for use with each user-defined type.
3) False. The stream member function flags with no arguments returns the current format settings as a fmtflags data type, which represents the format state.
4) True.

Computer Science & Information Technology

You might also like to view...

Aformula that will perform a calculation

a. Expression b. Comparison operator c. Zoom label

Computer Science & Information Technology

The information contained in an RSS feed and how it is represented has evolved since RSS was first developed in ____.

A. 1996 B. 1999 C. 2002 D. 2005

Computer Science & Information Technology

Which control is used to add a report to another report?

A. text box B. combo box C. subreport D. group section

Computer Science & Information Technology

When describing a queuing system, we use the term ____________________ to refer to the time it takes to serve a customer.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology