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...

Blogosphere is the practice of using social media sites to sell products and services

Indicate whether the statement is true or false

Computer Science & Information Technology

Word 2013 enables you to save files in the Word 97-2003 format, with the ________ extension

A) .docx B) .doc C) .pdf D) .rtf

Computer Science & Information Technology