+2 votes
in Class 12 by kratos

How is polymorphism implemented in C++?

1 Answer

+4 votes
by kratos
 
Best answer

C++ implements polymorphism through virtual functions, overloaded functions and overloaded operators. The term ‘overloaded function’ refers to a function having one name and more than one distinct meaning.

For example,

float area(float a)

{

return a*a;

}

float area(float a,float b)

{

return a*b;

}

...