C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 46)
46.
Which of the following keyword is used to overload an operator?
overload
operator
friend
override
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
5 comments Page 1 of 1.

Puja Nikam said:   2 years ago
The "operator" keyword is used with operators to overload them in C++.

Operator overloading allows you to give special meanings to operators when they are used with user-defined data types.

So, the answer is Operator.

Renu said:   3 years ago
Overloading any operator which places to operate, this is keyword before the operator.

Hari said:   7 years ago
Answer is overload.

RAM said:   1 decade ago
Before overloading any operator it is necessary to place "operator" keyword before the operators(+,-,* etc...).

Example:

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

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

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

Post your comments here:

Your comments will be displayed after verification.