Is following functions are said to be overloaded?

int add(int a,int b)

char *add(int a,int b)

Answers were Sorted based on User's Feedback



Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)..

Answer / arunkumar995

Function overloadig can not be achive only chaining the
return type.We must havv to change the aruments.

int add(int a,int b)
char*add(int a,int b)

one think that return type not make important role in
function overloading.In fun Overloading must effect on the
arguments.
Thus we say the given [int add(int a,int b)
char*add(int a,int b)]is not function overloaded.

Is This Answer Correct ?    6 Yes 1 No

Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)..

Answer / abilask

Yes the said funtion add is overloaded.
But it is in ambiguous state because of passing element is
same.
Compiler will differ with the passing elements, but dont
consider the return value.
In this quiestion the two add funtion having two different
return type int & char * respectively.

I think the below one will be correct example for
overloaded function.

int add(int a,int b);

char *add(float a,int b);

Is This Answer Correct ?    8 Yes 7 No

Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)..

Answer / ajay singh

No above function is not overloaded .... function over
loading can take place if the signature of the function is
different and the signature of the function do not include
the return type

Is This Answer Correct ?    0 Yes 0 No

Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)..

Answer / brunda r

no.

Is This Answer Correct ?    4 Yes 6 No

Post New Answer

More OOPS Interview Questions

what is meant by files?

4 Answers   Infosys,


How do you define social class?

0 Answers  


what is polymorpsim? what are its types?

8 Answers  


Why do we use encapsulation in oops?

0 Answers  


Which is the only operator in C++ which can be overloaded but NOT inherited?

8 Answers  






What is the problem with multiple inheritance?

0 Answers  


what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....

6 Answers  


What does no cap mean?

0 Answers  


What is a mixin class?

4 Answers  


Which is the parameter that is added to every non-static member function when it is called?

3 Answers   Accenture,


What is memory leak and memory corruption?

1 Answers   TCS,


Describe what an Interface is and how it?s different from a Class.

7 Answers   Spinsys,


Categories