Chapter 16: Inheritance — Online MCQ Test
COMPUTER SCIENCE · CLASS 11th · Tamil Nadu State Board
Practice Chapter 16: Inheritance with a free chapter-wise online MCQ test.
This chapter covers: Focusing on code reusability this chapter details base and derived class relationships inheritance types and access control mechanics. Students design hierarchical class structures....
AI-generated questions from basic to board-exam level, with instant results and explanations.
Chapter 16: Inheritance — Important Questions & Answers
Which concept allows a class to acquire the properties and behaviors of another class?
- A. Polymorphism
- B. Encapsulation
- C. Inheritance
- D. Abstraction
Answer: C. Inheritance
Inheritance is the mechanism by which one class derives features from another existing class.
Inheritance is the mechanism by which one class derives features from another existing class.
The class from which other classes are derived is known as the __________ class.
- A. Sub
- B. Base
- C. Child
- D. Derived
Answer: B. Base
The base class (or parent class) provides the members that are inherited by the derived class.
The base class (or parent class) provides the members that are inherited by the derived class.
When a derived class inherits from only one base class, it is called __________ inheritance.
- A. Multiple
- B. Multilevel
- C. Single
- D. Hierarchical
Answer: C. Single
Single inheritance involves exactly one base class and one derived class.
Single inheritance involves exactly one base class and one derived class.
Consider class A, B, and C. If B is derived from A, and C is derived from B, this represents:
- A. Multiple Inheritance
- B. Multilevel Inheritance
- C. Hierarchical Inheritance
- D. Hybrid Inheritance
Answer: B. Multilevel Inheritance
The transitive relationship A -> B -> C defines a multilevel structure.
The transitive relationship A -> B -> C defines a multilevel structure.
In 'public' inheritance, what happens to the public members of the base class?
- A. They become private in the derived class.
- B. They become protected in the derived class.
- C. They remain public in the derived class.
- D. They are deleted from the derived class.
Answer: C. They remain public in the derived class.
Under public inheritance, the public members of the base class remain public in the derived class.
Under public inheritance, the public members of the base class remain public in the derived class.