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
What are the three main types of variables?
write a program to find 2^n+1 ?
any one please tell me the purpose of operator overloading
to find out the minimum of two integer number of two different classes using friend function
Is abstract thinking intelligence?
What is the important feature of inheritance?
Why do we use oop?
Why do we need oop?
Why is polymorphism used?
can we make game by using c
What is multilevel inheritance explain with example?
What is advantage of inheritance?
what type of question are asked in thoughtworks pair programming round ?
What is object in oops?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.