Our website use cookies, which help us to improve our site and enables us to deliver the best possible service and customer experience. By clicking accept you are agreeing to our cookies policy. Find out more
If you notice any factual inaccuracies or other issues with this profile, please let us know. Please do not include any personal health information in this form.
Like Answer
"Poly" in Polymorphism is a Greek word which means many. So, in OOPs, "polymorphism" is the representation of a single function name with different number or sequence of parameters. For example,
void fun(int a);
void fun(char a);
void fun(int a, int b);
void fun(int a, long b);
void fun(long a, int b);
all of the above declared functions are identical/different.
Return type does not matter in the case of polymorphism. For example,
void fun(int a);
int fun(int a);
void fun(int a, int b);
int fun(int a, int b);
all the functions declared here will be treated as same.
In C++ polymorphism is of three type,
Function Overloading,
Function overriding and
Operator Overloading.