Question:

Which of the following operators cannot be overloaded?

Show Hint

A simple rule of thumb: operators that work on names rather than values (like.`,::`) cannot be overloaded.
Updated On: Jul 2, 2026
  • ::
  • +
  • =
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Operator overloading in C++ allows you to redefine the meaning of most built-in operators for user-defined types (classes).
However, a few operators cannot be overloaded. The main ones are:
Scope Resolution Operator (`::`) Member Access Operator (`.`) Pointer-to-Member Operator (`.`) Ternary Conditional Operator (`?:`) sizeof` Operator
Let's look at the options:
(A)::` (Scope Resolution Operator): This operator cannot be overloaded. Its meaning is fixed by the language to access static members, namespaces, or members of a base class.
(B)+` (Addition Operator): Can be overloaded.
(C)` (Multiplication or Dereference Operator): Can be overloaded.
(D)=` (Assignment Operator): Can be overloaded (and has a default implementation provided by the compiler).
Therefore, the::` operator cannot be overloaded.
Was this answer helpful?
0
0