Level 2

Overloading - Function Overloading

views

5:49
Here the name of each function is test but the input parameters are different. The first function does not have any input parameters. The second function has only one parameter int a, whereas the third function has two parameters float a and float b. But all these functions can exist in one class together. When we call a function, the compiler checks the input parameter and passes the control to the appropriate function.