In C++, function overloading allows multiple functions to have the same name but with different ________.
- parameters
- return types
- function names
- access specifiers
The correct answer is return types. In C++, function overloading is when you have multiple functions with the same name but differing in their parameter types or the number of parameters. However, their return types must be different to distinguish them. The other options are not relevant to function overloading.
Loading...
Related Quiz
- What is the significance of using pointers to arrays in C?
- How can you redirect error messages in a C program to a file instead of displaying them on the console?
- The function ________ can be used to determine the size of a file in C.
- Which preprocessor directive would be used to conditionally compile certain blocks of code?
- What function is commonly used in C for taking user input?