1.

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

A. Function argument too large.
B. Compilation Error
C. Programs Executed...
D. Runtime Error
E. None of these
Answer» D. Runtime Error


Discussion

No Comment Found

Related MCQs