write a c++ program to find maximum of two numbers using
inline functions.

Answer Posted / manjunathtek

#include<iostream>
using namespace std;
int main()
{
int c;
c=max(5,4); //will display 5
cout<<c<<endl;
return 0;
}
inline int max(int a, int b)
{
return (a>b)? a:b;
}

Is This Answer Correct ?    140 Yes 52 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of overloading?

876


Get me an image implementation program.

1757


Why multiple inheritance is not possible?

824


What is abstraction in oops with example?

1022


Why polymorphism is used in oops?

811


is there any choice in opting subjects like 4 out of 7

1950


Why do we use class?

838


write string class as your own class in java without using any built-in function

2236


What is inheritance write a program to show use of inheritance?

897


How do you answer polymorphism?

813


What is abstraction in oop?

875


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

1831


What is constructor overloading in oop?

889


What is overloading in oops?

864


What is polymorphism programming?

875