C++ is an Object-oriented programming language and it supports Polymorphism as well:
* Compile Time Polymorphism: C++ supports compile-time polymorphism with the help of features like templates, function overloading, and default arguments.
* Runtime Polymorphism: C++ supports Runtime polymorphism with the help of features like virtual functions. Virtual functions take the shape of the functions based on the type of object in reference and are resolved at runtime.
Posted Date:- 2021-09-29 22:29:33