Answer the following questions true (T) or false (F)
1. When an operator is overloaded as a member of a class, the first parameter listed in parentheses, is the calling object.
2. If a unary operator is overloaded as a stand-alone function, the argument may be any type.
1. False
Explanation: This is backwards. The calling object is the first argument.
2. False
Explanation: All overloaded operator functions must have at least one class type argument or be a member of a class. In the case of a unary operator, if it is overloaded as a member, there is no argument, there the class type calling object is the argument. If overloaded as a friend, there is one argument.
You might also like to view...
A problem can be solved with recursion if it can be broken down into successive smaller problems that are __________ to the overall problem.
Fill in the blank(s) with the appropriate word(s).
The ________ statement is used to make decisions.
Fill in the blank(s) with the appropriate word(s).
What file holds the preferences and settings of the currently signed-in user?
A. ntprofile.dat B. ntuser.dat C. profile.ini D. userconfig.ini
Describe three ways in which a named constant differs from a variable.
What will be an ideal response?