Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
CPP 2
« Previous
Next »
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
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
C test (42)
C (12)
C++ for beginners (10)
C++ (20)
C++ (24)
C++ (18)
C++ (14)
C++ (12)
C++ (15)
C++ (15)
Data structure (20)
Data structure (10)
Data structure (10)
Data structure (10)
PERL (25)
VC++ (11)
Oops (30)
Mainframe (41)
Mainframe (15)
Embedded systems (15)
OOAD (49)
Advertisement
▲