Which of the following is true about function overloading in C++? 

  • Functions must be in the same scope 
  • Return type can be used to differentiate overloaded functions 
  • Overloaded functions must have a different number of parameters 
  • Only member functions can be overloaded
Function overloading in C++ allows multiple functions with the same name but different parameters (types and/or number). They must be in the same scope. Return type alone cannot be used to distinguish overloaded functions, and both member and non-member functions can be overloaded.
Add your answer
Loading...

Leave a comment

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