🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: C++ Interview Questions: all 10 questions

Quiz: C++ Interview Questions · Question 2 of 10

Which is the only default difference between struct and class?

Which is the only default difference between struct and class?

  1. A.structs can't have functions
  2. B.Default member access: public for struct, private for class
  3. C.classes can't be inherited from
  4. D.structs can't have constructors
Answer & explanation

Correct answer: Default member access: public for struct, private for class

Everything else is the same.

Can you get the rest right without peeking?

Take the timed Quiz: C++ Interview Questions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →