🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Operators and Templates: all 10 questions

Quiz: Operators and Templates · Question 7 of 10

For a member operator+, what does the expression a + b become?

For a member operator+, what does the expression a + b become?

  1. A.operator+(b, a)
  2. B.a.operator+(b)
  3. C.b.operator+(a)
  4. D.a = a + b
Answer & explanation

Correct answer: a.operator+(b)

The left operand is the object the member function is called on; the right operand is the argument.

Can you get the rest right without peeking?

Take the timed Quiz: Operators and Templates quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →