← 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?
- A.structs can't have functions
- B.Default member access: public for struct, private for class
- C.classes can't be inherited from
- 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 →