Multiple choice

Operator overloading: the process in which operators are used to operate on different datatypes. For example, ‘+’ operator when used with integer of float, it does addition, while if it is used with character it does concatenation. Which of the following operators cannot be overloaded?

  1. ?:

  2. =

  3. -

  4. ++

  5. No such operator exists

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Following are the operators which cannot be overloaded: Conditional/ ternary operator (?: ), Class member access operator ( . , -> ), Scope resolution operator ( :: ) and Size operator ( sizeof ).