Question: Suppose that a new Complex class that represents a complex number has the following prototype for an overloaded multiplication operator method: Complex operator*(const Complex&) const;
Complex operator*(const Complex&) const;
For the expression a * b (where a and b are both objects of class Complex), what will be the actual member function call generated by the compiler?
| A. | a.operator*(b) | |
| B. | b.operator*(a) | |
| C. | operator*(a, b) | |
| D. | Overloaded operators never generate member function calls. |
Step by Step Solution
There are 3 Steps involved in it
Solutions Step 1 Answer C c1operatorc2 Explantion ... View full answer
Get step-by-step solutions from verified subject matter experts
