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

There are 2 empty jars of 5 and 3 liters capacity. And a river is flowing besides. I want to measure 4 liters of wanter using these 2 jars. How do you do this?

2 Answers  


What exactly is polymorphism?

0 Answers  


When not to use object oriented programming?

0 Answers  


Polymorphism with an example?

8 Answers   Accenture, emc2,


What do you mean by multiple inheritance and multilevel inheritance? Differentiate between them.

2 Answers  






What are the 3 pillars of oop?

0 Answers  


What is multiple inheritance ?

17 Answers   Blue Star, C DAC, CDAC, Impetus, Ness Technologies, Softvision Solution,


given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

0 Answers   DELL,


how to swap the variables without using temp and operators

1 Answers  


//what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }

1 Answers  


tell about copy constructor

3 Answers   Siemens,


Difference between over loading and over ridding?

12 Answers   CTS, Patni, Softvision Solution,


Categories