The general syntax for the function prototype to overload the assignment operator = for a class is ____.a. friend className& operator=(const className&);b. const className& operator=(const className&);c. className& operator=(className&);d. string className& operator=(className&);

Respuesta :

Limosa

Answer:

Option (B) is the correct answer to the following question.

Explanation:

Here, in the code "const" is the constant keyword which is used when we need that the value stored in that variable will never change.

The following option is correct because the assignment operator are those operator which initialize the value in the variable and overloading of the assignment operator would be as we use the other operators and also we could use them by creating the objects as we use in the copy constructor.

So, that's why the following option is correct.