write a program for function overloading?
Answer Posted / raja
#include<iiostream.h>
class overload
{
public:
int sum(int,int);
float sum(float,float);
};
int overload::sum(int num1,int num2)
{
return num1 + num2;
}
}
float overload::sum(float num1,float num2)
{
return num1+ num2
}
}
int main(90
{
overload o1;
cout<<"o1.sum(5.4f,8.6f)<<endl;
cout<<"o1.sum(19,34)<<endl;
}
Is This Answer Correct ? | 28 Yes | 8 No |
Post New Answer View All Answers
What is meant by multiple inheritance?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
what is difference between class template and template class?
Who invented oop?
What does I oop mean?
Can we override main method?
to find out the minimum of two integer number of two different classes using friend function
What is the difference between abstraction and polymorphism?
What is object in oop with example?
How is polymorphism achieved?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What are objects in oop?
Why we use classes in oop?
What is the point of polymorphism?
What is the main feature of oop?