🎙 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 4 of 10

Is friendship inherited by derived classes?

Is friendship inherited by derived classes?

  1. A.Yes, always
  2. B.No
  3. C.Only for public inheritance
  4. D.Only for templates
Answer & explanation

Correct answer: No

Friendship is granted explicitly and isn't inherited.

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 →