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 / sudesh kumar

#include<iostream.h>
#include<conio.h>
void add(int,int);
void add(int);
void main()
{
int a,b;
cout<<"enter two no";
cin>>a>>b;
add(a,b);
add(a);
getch();
}
void add(int x,int y)
{
int z;
z=x+y;
cout<<"the sum is "<<z;
}
void add(int x)
{
int z;
z=x*x;
cout<<"the sequre is A value"<<z;
}

Is This Answer Correct ?    37 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

2548


explain sub-type and sub class? atleast u have differ it into 4 points?

2323


What is the difference between a mixin and inheritance?

1000


Which language is not a true object oriented programming language?

1149


What are constructors in oop?

1211


What are the advantages of polymorphism?

1043


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2632


State what is encapsulation and friend function?

1287


Write a c++ program to display pass and fail for three student using static member function

3414


How can you overcome the diamond problem in inheritance?

1194


What is oops?what is its use in software engineering?

1045


Can destructor be overloaded?

1047


What is object and example?

1186


Why is there no multiple inheritance?

1016


Can static class have constructor?

1041