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 is the difference between encapsulation and polymorphism?
What are the 3 pillars of oop?
What is persistence in oop?
Can a destructor be called directly?
Templates mean
What is polymorphism programming?
What does no cap mean?
Is oop better than procedural?
What does <> mean pseudocode?
What does oop mean in snapchat?
What are the 5 oop principles?
What is basic concept of oop?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
Why do we use oops?
Get me an image implementation program.