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.


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.

Computer Science & Information Technology

You might also like to view...

Configuring a linked server which enables a data source to be queried directly from within SQL Server works well for static data sources.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The _______ is the browser’s data structure for the page.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The ________ view in Outlook Online enables you to see your responses as a partial message

Fill in the blank(s) with correct word

Computer Science & Information Technology

A mechanical drive is a traditional drive that requires

A) A motor to spin and has read-write heads B) A motor to spin but has no remote capabilities C) Flash memory to store data with no read-write heads D) No moving parts and produces less heat than other hard drives

Computer Science & Information Technology