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 in c++ to overload the function add (s1,s2)
where s1 and s2 are integers and floating point values.

Answer Posted / rose

include<iostream.h>

class overload
{
void add (int a, int b){
int c;
int c= a+b;
}
void add( float a,float b){
double c;
double c = a+b;}
}
void main()
{overload o = new overload();
o.add(10,20);
o.add(1.2,34.56);
getch();
}

Is This Answer Correct ?    14 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the fundamental idea of oop?

1143


What is constructor overloading in oop?

1145


Why multiple inheritance is not possible?

1079


What is a class in oop?

1140


i got a backdoor offer in process global,Bangalore..Can i work with it?

2846


When not to use object oriented programming?

1119


What are two types of polymorphism?

1081


What is the example of polymorphism?

1138


What are the benefits of interface?

1067


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

2424


What are functions in oop?

1063


What is difference between data abstraction and encapsulation?

1094


What is methods in oop?

983


What makes a language oop?

1075


What are the types of abstraction?

1082