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
explain sub-type and sub class? atleast u have differ it into 4 points?
What is abstraction in oops with example?
What are the important components of cohesion?
What is stream in oop?
What does and I oop mean?
What is abstraction with example?
write knight tour problem which is present in datastructure
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What are the three parts of a simple empty class?
How do you define a class in oop?
What is inheritance in simple words?
What is coupling in oops?
What is the main purpose of inheritance law?
What is use of overloading?
What type of loop is a for loop?