catch(exception &e)
{
. . .
}
Referring to the sample code above, which one of the
following lines of code produces a written description of
the type of exception that "e" refers to?
a) cout << e.type();
b) cout << e.name();
c) cout << typeid(e).name();
d) cout << e.what();
e) cout << e;

Answers were Sorted based on User's Feedback



catch(exception &e) { . . . } Referring to the sample code above, which one of the ..

Answer / guest

cout<<typeid(e).name() is the correct one

Is This Answer Correct ?    5 Yes 0 No

catch(exception &e) { . . . } Referring to the sample code above, which one of the ..

Answer / santhoo035

ans:c

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is lambda in c++?

0 Answers  


What is the benefit of c++?

0 Answers  


structure contains int, char, float how it behaves for big endian and little endian?

1 Answers   BITS,


Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).

0 Answers  


Why Pointers are not used in C++?

0 Answers   Global Logic,






Explain public, protected, private in c++?

0 Answers  


What is the output of printf("%d")?

58 Answers   CTS, HCL, Infosys, TCS, Winit, Wipro,


Where do I find the current c or c++ standard documents?

0 Answers  


When should we use container classes instead of arrays?

0 Answers  


What do you mean by early binding?

0 Answers  


List different attributes in C++?

0 Answers   Ericsson,


Is there structure in c++?

0 Answers  


Categories