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

What is data binding in oops?

590


c++ program to swap the objects of two different classes

1767


What is oops and its features?

594


What does <> mean pseudocode?

626


Can abstract class have normal methods?

616






What is class and object with example?

593


Which is better struts or spring?

624


What are two types of polymorphism?

616


How oops is better than procedural?

595


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

3850


How do you answer polymorphism?

580


What is difference between abstraction and encapsulation?

594


What is persistence in oop?

677


What is abstraction in oops with example?

780


Why do we use inheritance?

630