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
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 |
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 |
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 |
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?
What exactly is polymorphism?
When not to use object oriented programming?
Polymorphism with an example?
What do you mean by multiple inheritance and multilevel inheritance? Differentiate between them.
What are the 3 pillars of oop?
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
how to swap the variables without using temp and operators
//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(); }
tell about copy constructor
Difference between over loading and over ridding?
12 Answers CTS, Patni, Softvision Solution,