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 difference between polymorphism and inheritance?
What is destructor in oop?
Explain virtual inheritance?
explain sub-type and sub class? atleast u have differ it into 4 points?
write string class as your own class in java without using any built-in function
What is abstraction with example?
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
Describe these concepts: Polymorphism, Inheritance and Abstraction.
What type of loop is a for loop?
What does sksksk mean in text slang?
What is abstraction in oops with example?
How many human genes are polymorphic?
Get me an image implementation program.
What is abstraction in oop?
What is data binding in oops?