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
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What are different oops concepts?
Why do we need oop?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
Why oops is important?
What type of loop is a for loop?
What is the purpose of polymorphism?
Why is abstraction needed?
Explain virtual inheritance?
write a C++ program for booking using constructor and destructor.
What is this pointer in oop?
What is object-oriented programming? Webopedia definition
How to use CMutex, CSemaphore in VC++ MFC
What is encapsulation in oops?
what is graphics