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

Why multiple inheritance is not allowed?

594


How do you define social class?

611


How is class defined?

600


What is oops in simple words?

589


What is the problem with multiple inheritance?

593






what is graphics

2022


Why oops is important?

618


What is stream in oop?

848


What is object and example?

610


What is difference between inheritance and polymorphism?

582


program for insertion ,deletion,sorting in double link list

2289


Why do while loop is used?

584


What is data binding in oops?

595


What type of loop is a for loop?

696


Why is abstraction used?

617