--:--









Quiz for Concepts of inheritance and types of inheritance single

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



Logo

Q1: What is inheritance in C++?

Logo

Q2: What is single inheritance?

Logo

Q3: How is single inheritance declared in C++?

Logo

Q4: Which access specifier is commonly used for inheritance?

Logo

Q5: What members are inherited in single inheritance?

Logo

Q6: Can constructors be inherited?

Logo

Q7: Which keyword is used to call base class constructor?

Logo

Q8: How do you access base class members in derived class?

Logo

Q9: Can private members of base class be accessed in derived class?

Logo

Q10: Which type of inheritance models "is-a" relationship?

Logo

Q11: If class B inherits class A publicly, how is A's public members treated in B?

Logo

Q12: What is the size effect of inheritance on derived class?

Logo

Q13: Which of these is a benefit of single inheritance?

Logo

Q14: What happens if base class has virtual functions?

Logo

Q15: Can a derived class add new members?

Logo

Q16: What is the default inheritance mode if none specified?

Logo

Q17: In single inheritance, if base class destructor is virtual, what about derived?

Logo

Q18: How does single inheritance help in polymorphism?

Logo

Q19: Which keyword specifies inheritance type?

Logo

Q20: What is the main purpose of inheritance in C++?

Logo

Q21: In single inheritance, how many base classes does a derived class have?

Logo

Q22: Which syntax correctly defines single inheritance?

Logo

Q23: Which access specifier in inheritance keeps the base class public members as protected?

Logo

Q24: Can a derived class access private members of its base class directly?

Logo

Q25: What is the effect of private inheritance?

Logo

Q26: How does single inheritance affect object size?

Logo

Q27: Which of the following is true about constructors in inheritance?

Logo

Q28: What is the role of virtual functions in inheritance?

Logo

Q29: Which keyword is used to prevent further inheritance?

Logo

Q30: In single inheritance, which of these relationships is established?

Logo

Q31: How does access specifier "public" affect inheritance?

Logo

Q32: Can a derived class override a base class member function?

Logo

Q33: Which of these is not a valid inheritance type in C++?

Logo

Q34: What happens if base class destructor is not virtual?

Logo

Q35: Which of the following statements is true for single inheritance?

Logo

Q36: How can a derived class call a base class function explicitly?

Logo

Q37: What is object slicing?

Logo

Q38: Is it possible to inherit constructors in C++11 and later?

Logo

Q39: Which statement is correct about base class pointer?

Are you ready to start test? Set your time limit