What is Polymorphism At Compile Time?




What is Polymorphism At Compile Time?

In compile time polymorphism, compiler is able to select the appropriate function for a particular call at the compile time itself. e.g. Function overloading and operator overloading.

Function Overloading

Define multiple functions with the same name is called function overloading. The function would perform different operations, depending on argument list in the function.

Operator Overloading

Operator overloading means giving capability to operator to work on different operands.