C++ | Virtual Functions | Question 2
Predict output of the following program
In Base In Base
In Base In Derived
In Derived In Derived
In Derived In Base
Explanation: Since show() is virtual in base class, it is called according to the type of object being referred or pointed, rather than the type of pointer or reference.
Quiz of this Question