Which of the following allows the same function name to be used with different parameter lists in C++?
Options
- A. Function overloading
- B. Function hiding
- C. Function deletion
- D. More than one of the above
- E. None of the above
Quiz Practice:
A. Function overloading
Answer: Function overloading
Function overloading allows multiple functions to have the same name as long as their parameter lists are different.
For example, a function named add() can be defined with two integers or with three integers. The compiler determines which version should be called based on the arguments.