1.

What is virtual and pure virtual function?

Answer»
Virtual FunctionPure Virtual Function
Virtual Function has its definition HIDDEN in the Base classThey have no definition in the Base class.
The derived class can OVERRIDE the virtual function if required.In the case of a pure virtual function, the derived class has to override it.
If the derived class fails to override then it has the option to use the virtual function of the base classIt will THROW a compilation error if it fails to override pure virtual function.


Discussion

No Comment Found