WHY FUCTION OVERLOADING DOSENOT RETURN A RETEN TYPE
Answer Posted / subhashish sen
I think the Question is wrong !!!!!The Question would have
been like this..
Why Function Overloading does not depend on the return type?
Ans : Function Overloading does not depend on the return
type but it depends on number, type and order of arguments
of function..
In this case Overloading Possible
-----------------------------------
Ex : int fun(int a,int b){}
int fun(int x,float y){}
In this case Overloading is not possible
---------------------------------------
int fun(int a,int b){}
float fun(int x,float y){}
The reason is..while invoking these function its not
necessary to get the return value always,means if you don't
get the return value it also works...But this wont be
possible for no,type or order of arguments..
If you need further clarification reply me....
| Is This Answer Correct ? | 12 Yes | 10 No |
Post New Answer View All Answers
What is abstraction in oop?
How to call a non virtual function in the derived class by using base class pointer
Explain the concepts involved in Object Oriented programming.
What is new keyword in oops?
What is polymorphism and example?
what are the ways in which a constructors can be called?
What is constructor overloading in oop?
write a C++ program for booking using constructor and destructor.
What is a function in oop?
What is an interface in oop?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
Why oops is important?
is there any choice in opting subjects like 4 out of 7
What is difference between oop and pop?
What is polymorphism used for?