Discussion
To overload an operator................. keyword must be used along with the operator to be overloaded.
Answer: D
The keyword is operator.
An overloaded operator is defined as a function whose name is the keyword operator followed by the symbol being overloaded. For example, Complex operator+(const Complex &other) const; declares how + works for a Complex class, and the compiler then translates a + b into a call to that function.
'Over' and 'Overload' are not C++ keywords at all. void is a keyword, but it names the empty return type and has nothing to do with overloading operators.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development