Users Also Read
MCQ's Search Engine
Electrical Engineering
Mechanical Engineering
Civil Engineering
Automobile Engineering
Chemical Engineering
Computer Engineering
Electronics Engineering
Medical Science Engg
What is polymorphism in C++? Explain with an example?
Poly means "many" and "morph" means "form".
Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of object.
Example : function overloading, function overriding, virtual functions.
Another example can be a plus ‘+’ sign, used for adding two integers or for using it to concatenate two strings.
Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of object.
Example : function overloading, function overriding, virtual functions.
Another example can be a plus ‘+’ sign, used for adding two integers or for using it to concatenate two strings.