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.

Computer Science & Information Technology

You might also like to view...

A ____ is any Outlook item such as a task, an email message, or a contact that has been flagged for follow-up later.

A. task cluster B. to-do list C. to-do item D. category

Computer Science & Information Technology

Generally, __________ programs in memory means greater utilization of the processor.

a. more b. fewer c. larger d. smaller

Computer Science & Information Technology