1.

What is the output of this program?
#include <stdexcept>
#include <limits>
#include <iostream>
using namespace std;
void Function(char ch)
{
if (ch < numeric_limits::max())
return invalid_argument;
}
int main()
{
try
{
Function(50);
}
catch(invalid_argument& excep)
{
cout << excep.what() << endl;
return -1;
}
return 0;
}

A. Invalid argument
B. 50
C. Compilation Error
D. Runtime Error
E. None of these
Answer» D. Runtime Error


Discussion

No Comment Found

Related MCQs