Inheritance Questions

Practice Inheritance MCQs with answers and explanations. Page 2 of 2.

Category
C# Programming
Topic
Inheritance
Page
2 / 2
Mode
Practice

Questions

Open any question to view the answer and explanation.

Library reuse: Can we derive a class from a base class even if the base class’s source code is not available (for example, only a header, binary, or assembly/metadata is provided)? Choose the best evaluation.
Open
View answer
Access directionality: Because a derived class can access public members of its base class, does it follow that base-class member functions can access public members of the derived class? Provide the correct judgment.
Open
View answer
Composition vs. inheritance: Is it illegal in C++ to declare objects of one class as data members of another class? Choose the most accurate statement.
Open
View answer
Inherited member availability: If the base class defines a member function func(), and the derived class does not define a function with that name, can an object of the derived class call func()? Provide the correct evaluation.
Open
View answer
C#.NET inheritance access modes: Does C# support private or protected forms of inheritance (i.e., changing base-member accessibility via an inheritance specifier)? Choose the most accurate statement.
Open
View answer
Object-oriented programming (C++/OOP): Does creating a derived class require fundamental changes to the existing base class? Choose the most accurate statement about inheritance design and source-code impact.
Open
View answer
Object-oriented programming: Is multilevel inheritance allowed (A → B → C → D)? Select the statement that best reflects C++/Java-style inheritance rules.
Open
View answer
Access control in inheritance: Can a derived class object access private members of its base class directly? Choose the most accurate statement.
Open
View answer

Practice smarter

Solve a few questions daily and revisit weak topics regularly to improve accuracy.