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
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
Can we create object of abstract class?
What is object in oop with example?
What is an advantage of polymorphism?
What is encapsulation and abstraction? How are they implemented in C++?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What does sksksk mean in text slang?
What is difference between class and object with example?
What is cohesion in oop?
What is polymorphism and example?
What is difference between inheritance and polymorphism?
Prepare me a program for the animation of train
Why is static class not inherited?
What is the difference between static polymorphism and dynamic polymorphism?
What is inheritance write a program to show use of inheritance?