Which of the following changes will NOT result in a different overloaded function in C++?

  • Changing the data type of parameters
  • Changing the number of parameters
  • Changing the order of parameters
  • Changing the return type of a function
In C++, changing only the return type of a function does not result in a different overloaded function. Overloaded functions are distinguished based on the number or type of parameters, not the return type.
Add your answer
Loading...

Leave a comment

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