C++ Programming - OOPS Concepts - Discussion

Discussion :: OOPS Concepts - General Questions (Q.No.46)

46. 

Which of the following keyword is used to overload an operator?

[A]. overload
[B]. operator
[C]. friend
[D]. override

Answer: Option B

Explanation:

No answer description available for this question.

Dixit said: (Aug 2, 2013)  
Before overloading any operator it is necessary to place "operator" keyword before the operators(+,-,* etc...).

Example:
void operator+() {};
void operator=() {};

Ram said: (May 13, 2014)  
Before overloading any operator it is necessary to place "operator" keyword before the operators(+,-,* etc...).

Example:

void operator+() {};
void operator=() {};
void operator-() {};

Hari said: (Jul 17, 2018)  
Answer is overload.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.