How does C++ distinguish between overloaded functions at compile time?
- By considering the function name and parameter types
- By considering the order in which functions are defined
- By considering the return type
- By using a random process
C++ distinguishes between overloaded functions at compile time primarily by considering the function name and the parameter types. The return type is not used for this purpose. This is known as compile-time or static polymorphism.
Loading...
Related Quiz
- What will be the flow of control in a switch statement if there is no break keyword at the end of a case?
- If you want to force floating-point division in C++ when dividing two integers, one of the numbers should be _______.
- When a function is called recursively, each call creates a new set of the function's _______.
- A function template enables you to write a single function that can handle data of _______ type(s).
- What is the main advantage of function overloading?