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 / krithika

#include<iostream.h>
#include<conio.h>
class a
{
int area(int a)
{
cout<<"enter the side";
cin>>a;
return(a*a(;
}
float area(float l,float b)
{
cout<<"enter the length and breadth":
cin>>l>>b;
return(l*b);
}
};
int main()
{
clrscr();
a e;
int a;
float l,b;
cout<<"the area of a square"<<e.area(a);
cout<<"the area of a rectangle"<<e.area(l,b);
getch();
return 0;
}

Is This Answer Correct ?    29 Yes 34 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is multilevel inheritance explain with example?

1155


Can you inherit a private class?

1106


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

2545


What is byval and byref? What are differences between them?

2221


What is inheritance in simple words?

1059


Is enum a class?

1072


What is encapsulation in oops?

1019


Why is polymorphism important in oop?

1091


what type of questions

2130


What is abstraction in oops?

1050


What is polymorphism used for?

1073


What is the real life example of polymorphism?

1178


which feature are not hold visual basic of oop?

2196


What is polymorphism programming?

1135


Why do we use class?

1098