Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I hv a same function name,arguments in both base class and
dervied class, but the return type is different. Can we call
this as a function overloading? Explain?

Answer Posted / vivek

Because the function caller has the option of ignoring the function return value (as demonstrated below), overloading based on function return value is not considered as a valid case to be supported by the language.

class Demo
{

int function(){ return 1; };

};

int main()
{

Demo demoObject;

demoObject.function();

return 0;
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is polymorphism used?

1005


write a program to find 2 power of a 5digit number with out using big int and exponent ?

2343


Why do we use encapsulation in oops?

989


What is abstract class in oops?

985


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

2082


What is encapsulation selenium?

966


What is inheritance write a program to show use of inheritance?

1102


What is difference between inheritance and polymorphism?

987


Why is encapsulation used?

954


What are the benefits of interface?

1008


How is class defined?

1083


How many human genes are polymorphic?

1019


What is the oops and benefits of oops programming?

940


What does enum stand for?

1077


What is static in oop?

1032