The general syntax for the function prototype to overload the assignment operator = for a class is ____.

A. friend className& operator=(const className&);
B. className& operator=(className&);
C. string className& operator=(className&);
D. const className& operator=(const className&);


Answer: D

Computer Science & Information Technology

You might also like to view...

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

1. It is illegal to use an assignment statement to store one pointer value into another pointer 2. Relational operators cannot be used on pointer variables. 3. A pointer variable can contain only a memory address. 4. If the number of elements to be placed in a stack can vary significantly as a program executes, it is usually better to represent the stack as a dynamically allocated linked list rather than as an array 5. When representing a stack as a linked list, all insertions and deletions are done at the rear of the list.

Computer Science & Information Technology

List seven design guidelines for a Web-based fill-in form.

What will be an ideal response?

Computer Science & Information Technology

A car averages 25 miles to the gallon. If gasoline costs $1.30 per gallon, how much does it cost to go on a trip of 1000 miles?

Let x equal what you are trying to fmd x = ($ / trip) What will be an ideal response?

Computer Science & Information Technology

Excel 2013 addresses linked workbooks using absolute addresses, where prior versions of Excel used relative addresses

Indicate whether the statement is true or false.

Computer Science & Information Technology