Multiple choice

Which of the following operators can be overloaded in C++?

  1. +=

  2. =

  3. = =

  4. All of the above

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

In C++, the +=, =, and == operators can all be overloaded. The += operator can be overloaded as a compound assignment operator, while = and == can be overloaded as member or non-member functions.