Module 3 (Quiz)
Module 3 (Quiz)
Reg No. *
aafi
A) Code reusability
B) Polymorphism
C) Encapsulation
No correct answers
https://docs.google.com/forms/d/e/1FAIpQLSdCWqRc57aukIQwn-Ak677kE0Y16iUyUoUmRM-CPvmYbV6MBQ/viewscore?viewscore=AE0zAgC… 1/5
05/04/2024, 16:17 Module-3 (Quiz)
Which type of inheritance involves a class being derived from two 0/1
classes, one of which is a base class and the other is derived from that
base?
A) Single inheritance
B) Multiple inheritance
C) Multilevel inheritance
D) Hybrid inheritance
Correct answer
D) Hybrid inheritance
A) A problem where two classes inherit from the same base class, and a class
derived from these two classes tries to access a member of the base class.
B) A problem where two classes inherit from each other, causing ambiguity in
accessing members.
C) A problem where a class has multiple base classes that have a common base
class, leading to ambiguity in member access.
How do you call the base class constructor from a derived class 0/1
constructor in C++?
A) super();
B) BaseClass();
C) BaseClass::BaseClass();
D) DerivedClass::BaseClass();
https://docs.google.com/forms/d/e/1FAIpQLSdCWqRc57aukIQwn-Ak677kE0Y16iUyUoUmRM-CPvmYbV6MBQ/viewscore?viewscore=AE0zAgC… 2/5
05/04/2024, 16:17 Module-3 (Quiz)
Correct answer
Which access specifier is used to specify that a base class member is 0/1
accessible only within the base class and its derived classes?
A) private
B) protected
C) public
D) internal
Correct answer
B) protected
https://docs.google.com/forms/d/e/1FAIpQLSdCWqRc57aukIQwn-Ak677kE0Y16iUyUoUmRM-CPvmYbV6MBQ/viewscore?viewscore=AE0zAgC… 3/5
05/04/2024, 16:17 Module-3 (Quiz)
Which type of inheritance allows a class to inherit from more than one 0/1
base class?
A) Single inheritance
B) Multiple inheritance
C) Multilevel inheritance
D) Hybrid inheritance
Correct answer
B) Multiple inheritance
Which of the following statements about virtual inheritance in C++ is true? 1/1
A) It ensures that only one copy of the base class's member variables is inherited
by the derived class.
B) It resolves the Diamond Problem by ensuring that the base class is inherited
only once in the hierarchy.
This form was created inside of VIT Bhopal University. Report Abuse
Forms
https://docs.google.com/forms/d/e/1FAIpQLSdCWqRc57aukIQwn-Ak677kE0Y16iUyUoUmRM-CPvmYbV6MBQ/viewscore?viewscore=AE0zAgC… 4/5
05/04/2024, 16:17 Module-3 (Quiz)
https://docs.google.com/forms/d/e/1FAIpQLSdCWqRc57aukIQwn-Ak677kE0Y16iUyUoUmRM-CPvmYbV6MBQ/viewscore?viewscore=AE0zAgC… 5/5