+2 votes
in Class 12 by kratos

What do you understand by Function overloading or Functional polymorphism? Explain with suitable example.

1 Answer

+2 votes
by kratos
 
Best answer

It is a method of using the same function or method to work using different sets of input. Function overloading is one of the example of polymorphism, where more than one function carrying same name behave differently with different set of parameters passed to them.

void show()

{

cout<<”\n Hello World!”;

}

void show(char na[])

{

cout<<”\n Hello World! Its ”<<na;

}

...