write a program for function overloading?
Answer Posted / riks
#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 ? | 39 Yes | 23 No |
Post New Answer View All Answers
How Do you Code Composition and Aggregation in C++ ?
What is the purpose of enum?
What are objects in oop?
2. Give the different notations for the class.\
What is encapsulation in ict?
What is inheritance in simple words?
What is the significance of classes in oop?
What do you mean by variable?
What does and I oop mean?
What is abstraction with example?
is there any choice in opting subjects like 4 out of 7
What do you mean by abstraction?
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
Can private class be inherited?
how to get the oracle certification? send me the answer