-
What is the output of this program?
#include
using namespace std;
int max(int p, int q)
{
return ( p > q ? p : q);
}
int main()
{
int m = 15;
int n = 16;
cout << max(m, n);
return 0;
}
-
- Compilation Error
- Runtime Error
- Garbage value
- 15
- 16
Correct Option: E
In this program, we are returning the maximum value by using conditional operator.