Answer the following questions true (T) or false (F)
1. When overloading an operator, you cannot change the number of arguments an operator takes.
2. Overloaded operator <<, when used as an output, returns an ostream& to allow chains of output statements, and similarly the overloaded operator >> returns an istream&
1. True
Explanation: The compiler recognizes the operators and expects them have the usual of arguments.
2. True
Explanation: We do this so that our overloaded operator << mimics the behavior of the overloaded operator << for primitive types. Uniformity of behavior of user and built-in types is a goal of C++ design.
You might also like to view...
A network used to communicate among devices close to one person is called a(n) ________
Fill in the blank(s) with correct word
Two elements on the same page can have the same id attribute.
Answer the following statement true (T) or false (F)
Which document will be stamped with the Secretary of State's filing stamp?
A. Power of Attorney B. Articles of Incorporation C. Notice of Deposition D. all the documents must be stamped
The possession of information is the quality or state of having value for some purpose or end.
Answer the following statement true (T) or false (F)