Polymorphism In C Plus Plus - Study Mode

[#1] Which type of polymorphism allows different classes to be treated as instances of the same class through a common interface?
Correct Answer

(B) Run-time polymorphism

[#2] How can you achieve runtime polymorphism in C++?
Correct Answer

(B) By using virtual functions

[#3] In C++, which keyword can be used to prevent a virtual function from being overridden in derived classes?
Correct Answer

(B) final

[#4] What is the main advantage of polymorphism in C++?
Correct Answer

(A) Code reusability

[#5] Which C++ keyword is used to access the base class within a derived class?
Correct Answer

(B) base