In C++, two different functions can have the same name if their parameter types are same.

Options
- True
- False


CORRECT ANSWER : False

Discussion Board
C++ - Function Overloading

Answer: False
If any class have multiple functions with same names but different parameters then they are said to be overloaded. Function overloading allows you to use the same name for different functions, to perform, either same or different functions in the same class.
Following are the ways to overload a function:
By changing number of arguments.
By having different types of argument.

Prajakta Pandit 01-25-2017 12:15 AM

function overloading

ANS:: false

the question tell that the function haveing same name and same parameter means if u declare const int in first function then the second function having same parameter so this is false

sandeep kawale 10-8-2013 09:03 AM

It is true

Member functions can be overloaded based solely on the
constness. That is, we can have two member functions with
the same name and the same parameters, as long as one is const
and the other is not.

jordi 09-8-2013 08:06 AM

True

what the f is this : response : True : we can have two functions with same name and same parameters type but not same parameter number.


aka 07-9-2013 12:03 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement