--:--









Quiz for Access control in inheritance

Course: C++ Language | Subject: Unit 6 | Topic: Inheritance



Logo

Q1: What does public inheritance mean?

Logo

Q2: What happens to public and protected members in private inheritance?

Logo

Q3: In protected inheritance, what is the accessibility of base class public members?

Logo

Q4: Can private members of base class be accessed by derived class?

Logo

Q5: Which inheritance type is default for class?

Logo

Q6: Which inheritance type is default for struct?

Logo

Q7: What access level does derived class have to base class private members?

Logo

Q8: How can derived class access private members of base class?

Logo

Q9: If base class member is protected, what is its accessibility in public inheritance?

Logo

Q10: Can derived class reduce accessibility of base class members?

Logo

Q11: Which inheritance mode hides base class public members in derived class?

Logo

Q12: What is the effect of using "using" declaration in derived class?

Logo

Q13: Can protected inheritance make private members accessible to derived class?

Logo

Q14: What does friend class allow in inheritance context?

Logo

Q15: If a base class has a private member, can derived class access it directly?

Logo

Q16: What happens to base class private members during inheritance?

Logo

Q17: Is it possible to access private members of base class using pointers in derived class?

Logo

Q18: How to make a base class member accessible to derived classes only?

Logo

Q19: What access level should be used to hide members from outside but allow derived class access?

Logo

Q20: Which inheritance type allows the most restrictive access to base class members?

Logo

Q21: Can access specifier change during multiple inheritance?

Are you ready to start test? Set your time limit