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 data binding in oops?
c++ program to swap the objects of two different classes
What is oops and its features?
What does <> mean pseudocode?
Can abstract class have normal methods?
What is class and object with example?
Which is better struts or spring?
What are two types of polymorphism?
How oops is better than procedural?
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
How do you answer polymorphism?
What is difference between abstraction and encapsulation?
What is persistence in oop?
What is abstraction in oops with example?
Why do we use inheritance?