+ 1
Why function overloading is called compile time polymorphism?
2 ответов
+ 2
Same function could behave differently depending of parameters (overloads), that's why it is polymorphism. And it is compile time because the right version is chosen during compilation by compiler.
+ 1
In function overloading ,as one function behaving differently at different instant of time in a single program so it comes under the polymorphism.As the function body for each function call is chosen in compilation time so it is known as Compiletime polymorphism