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

write a program for function overloading?

Answer Posted / riks

#include<iiostream.h>
class overload
{
public:
int sum(int,int);
float sum(float,float);
};
int overload::sum(int num1,int num2)
{
return num1 + num2;
}
}
float overload::sum(float num1,float num2)
{
return num1+ num2
}
}
int main(90
{
overload o1;
cout<<"o1.sum(5.4f,8.6f)<<endl;
cout<<"o1.sum(19,34)<<endl;

Is This Answer Correct ?    39 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to get the oracle certification? send me the answer

2118


What is advantage of inheritance?

1138


What is object in oops?

1028


What are the types of abstraction?

1010


What is constructor overloading in oop?

1088


What does no cap mean?

1013


any one please tell me the purpose of operator overloading

2347


What is protected in oop?

1018


Why multiple inheritance is not possible?

1027


What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2496


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

2155


What are benefits of oop?

1085


what type of question are asked in thoughtworks pair programming round ?

2156


• What are the desirable attributes for memory managment?

2176


Why do we use inheritance?

1070