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
Write a program to reverse a string using recursive function?
How is polymorphism achieved?
What is overloading in oops?
What are the components of marker interface?
How is class defined?
Can you explain polymorphism?
given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy
What is encapsulation process?
What is the types of inheritance?
How long to learn object oriented programming?
Why is abstraction used?
What is the purpose of polymorphism?
What is purpose of inheritance?
2. Give the different notations for the class.\
What do you mean by overloading?