-
What is the output of this program?
#include <iostream>
using namespace std;
template<typename type>
type Maximum(type num1, type num2)
{
return num1 > num2 ? num1:num2;
}
int main()
{
int Res;
Res = Maximum(150, 250);
cout << Res << endl;
return 0;
}
-
- 250
- 150
- Compilation Error
- Runtime Error
- None of these
Correct Option: A
In this program, We are returning the maximum value by using function template.