Multiple choice

Which of the following operators cannot be overloaded using friend function? a) = b) -> c) [ ] d) -

  1. Both a and b

  2. Only b

  3. a, b and c

  4. All a, b, c and d

  5. Both b and d

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

Friend function cannot be used to overload: =,->,[ ],( ). So option 3 is the correct answer.