What is the output of the program if character 4 is supplied as input?
#include
using namespace std;
int main () {
int c;
cin >> c;
try
{
switch (c)
{
case 1:
throw 20;
case 2:
throw 5.2f;
case 3:
throw 'a';
default:
cout<<"No exception";
}
}
catch (int e)
{ cout << "int exception. Exception Nr. " << e; }
catch (float e)
{ cout << "float exception. Exception Nr. " << e; }
catch (...)
{ cout << "An exception occurred."; }
return 0;
}
Willetta
4 hours agoNathalie
5 days agoMaia
10 days agoJavier
16 days agoChandra
21 days agoKina
26 days agoYvonne
1 month agoAlverta
1 month agoShawn
1 month agoMoon
2 months agoShakira
2 months agoTeresita
2 months agoCarry
2 months agoCarmela
2 months ago