Solved

An Overloaded + Operator Takes a Class Object and a Double

Question 9

Multiple Choice

An overloaded + operator takes a class object and a double as operands. For it to be commutative (i.e., a + b and b + a both work) :


A) operator+ must be a member function of the class from which the objects are instantiated.
B) operator+ must be a non-member function.
C) It must be overloaded twice; the operator+ function that takes the object as the left operand must be a member function, and the other operator+ function must be a global function.
D) The + operator cannot be overloaded to be commutative.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions