write a program for function overloading?
Answer Posted / nekkanti rajesh
#include<iiostream.h>
class overload
{
public:
int max(int,int);
floatmax(float,float);
};
int overload::max(int num1,int num2)
{
if(num1>nmu2)
{
return num1;
}
else
{
return num2;
}
}
float overload::max(float num1,float num2)
{
if(num1>num2)
{
return num1;
}
else
{
return num2;
}
}
int main(90
{
overload o1;
cout<<"o1.max(5.4f,8.6f)<<endl;
cout<<"o1.max(19,34)<<endl;
}
Is This Answer Correct ? | 143 Yes | 57 No |
Post New Answer View All Answers
What is polymorphism explain its types?
What is oops in simple words?
Get me a number puzzle game-program
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
What is pointer in oop?
What is difference between multiple inheritance and multilevel inheritance?
How do you define social class?
Why it is called runtime polymorphism?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
What is object and example?
What is interface in oop?
Why do pointers exist?
What is encapsulation process?
What is object-oriented programming? Webopedia definition
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