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


Please Help Members By Posting Answers For Below Questions

Why is it so that we can have virtual constructors but we cannot have virtual destructors?

3817


What are different oops concepts?

568


Why do we need oop?

657


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).

1662


Why oops is important?

599






What type of loop is a for loop?

682


What is the purpose of polymorphism?

671


Why is abstraction needed?

561


Explain virtual inheritance?

680


write a C++ program for booking using constructor and destructor.

2040


What is this pointer in oop?

549


What is object-oriented programming? Webopedia definition

717


How to use CMutex, CSemaphore in VC++ MFC

4324


What is encapsulation in oops?

532


what is graphics

2004