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.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *