Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Inheritance Questions
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.
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.
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.
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.
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.
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.
Object-oriented programming: Is multilevel inheritance allowed (A → B → C → D)? Select the statement that best reflects C++/Java-style inheritance rules.
Access control in inheritance: Can a derived class object access private members of its base class directly? Choose the most accurate statement.
1
2