James sees that two functions with identical names and parameters exist in a program. However, they perform different operations. He initially thinks it's function overloading. What misconception does he have about function overloading?

  • Function overloading allows multiple functions with the same name and different parameters
  • Function overloading allows multiple functions with the same name and same parameters
  • Function overloading is not related to function names
  • Function overloading requires different return types
James has a misconception about function overloading. Function overloading allows multiple functions with the same name but different parameters. It's the difference in parameter types or the number of parameters that distinguishes overloaded functions, not the name alone.
Add your answer
Loading...

Leave a comment

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