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
Can bst contain duplicates?
What is overriding in oops?
Get me an image implementation program.
Why we use classes in oop?
What is debug class?what is trace class? What differences are between them? With examples.
Can we create object of abstract class?
What is object in oop with example?
Can a destructor be called directly?
What is destructor give example?
What does I oop mean?
what type of questions
#include
What is the advantage of oop over procedural language?
What is and I oop mean?
What is interface in oop?