When a virtual member function of a class in a class hierarchy is invoked through a pointer to an object in the class hierarchy, the compiler will select the member function to be invoked
A) from the class of the object that is pointed to.
B) from the class of the type of the pointer.
C) from the base class of the inheritance hierarchy.
D) from the derived class of the base pointer object.
E) None of the above
Correct Answer:
Verified
Q9: A virtual function is declared by placing
Q10: Polymorphism is when in a class hierarchy
Q11: When more than one class is derived
Q12: functions are dynamically bound by the compiler.
A)Constructor
B)Static
C)Destructor
D)Virtual
E)None
Q15: An abstract class is somewhat restricted in
Q16: A class with at least one pure
Q17: An abstract class is
A)one that supports polymorphism.
B)one
Q18: Polymorphism in C++ will not work unless
Q19: A pure virtual function
A)is a virtual function
Q20: Pointers to a base class may be
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents