Discussion
In C++/C operators such as............ cannot be overloaded.
Answer: C
The operator that cannot be overloaded is ::, the scope resolution operator.
C++ allows most operators to be given new meanings for user-defined types, but a few are fixed by the language: the scope resolution operator ::, the member access operator ., the pointer-to-member operator .*, the conditional operator ?: and sizeof. These work on names and types at compile time rather than on values, so overloading them would make the language ambiguous.
The other options, +, ++ and ==, are among the operators most commonly overloaded, for example to add, increment or compare objects of a class.
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