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

Whats is abstraction in oops?

1070


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1989


What is static in oop?

1075


program for insertion ,deletion,sorting in double link list

2681


is there any choice in opting subjects like 4 out of 7

2169


What is the renewal class?

2752


What is interface? When and where is it used?

2163


What are functions in oop?

1050


What makes a language oop?

1051


What are the 4 pillars of oop?

1140


How to use CMutex, CSemaphore in VC++ MFC

4776


Give two or more real cenario of virtual function and vertual object

2327


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6676


What are the 4 main oop principles?

1219


Can an interface inherit a class?

1055