Is following functions are said to be overloaded?
int add(int a,int b)
char *add(int a,int b)
Answer Posted / 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 |
Post New Answer View All Answers
What does no cap mean?
What is polymorphism and types?
What is persistence in oop?
What do you mean by abstraction?
What is difference between polymorphism and inheritance?
What does oop mean in snapchat?
Why do we use oops?
What is the point of polymorphism?
What does and I oop mean?
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
Can you explain polymorphism?
How do you answer polymorphism?
What are the three main types of variables?
What is abstraction oop?
What is the advantage of oop over procedural language?