Home » C++ Programming » Functions » Question
  1. What is the output of this program?
    #include <iostream>   
    #include <algorithm>
    using namespace std;
    int main ()
    {
    cout << "Max Value (15, 12) = " << max(15, 12) << '\n';
    cout << "Max Value (L, U) = " << max('L', 'U') << '\n';
    return 0;
    }
    1. Max Value (15, 12) = 15
    2. Max Value (15, 12) = 15
      Max Value (L, U) = U
    3. Max Value (L, U) = U
    4. Max Value (L, U) = U
      Max Value (15, 12) = 15
    5. None of these
Correct Option: B

In this program, We found the max value in the given value by using max function.



Your comments will be displayed only after manual approval.