1.

What is the output of this program?
#include 
using namespace std;
int main()
{
int num = 20;
try
{
if (num != 20)
{
throw "Positive Number Required";
}
cout << num;
}
catch(const char *Msg)
{
cout << "Error: " << Msg;
}
return 0;
}

A. Compilation Error
B. Runtime Error
C. Garbage value
D. error:Positive Number Required
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs