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
Why do we use encapsulation in oops?
What are the 4 main oop principles?
Why is destructor used?
write knight tour problem which is present in datastructure
What is use of overloading?
i got a backdoor offer in process global,Bangalore..Can i work with it?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
write string class as your own class in java without using any built-in function
Describe these concepts: Polymorphism, Inheritance and Abstraction.
Can static class have constructor?
How to improve object oriented design skills?
What does and I oop and sksksk mean?
Can private class be inherited?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box