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

Can we use clrscr in c++?

0 Answers  


What is a container class? What are the types of container classes in c++?

0 Answers  


Which operator cannot overload?

0 Answers  


How a macro differs from a template?

0 Answers  


How do you master coding?

0 Answers  






What are disadvantages of pointers?

0 Answers  


Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..

0 Answers  


What is the output of the following 3D Array int arr[3][2][2]={1,2,3,4,5,6,7,8,9,10,11,12}; what is the output for arr[2][1][0]?

6 Answers   HCL, Integra, IPMC, ORG,


Differentiate between the manipulator and setf( ) function?

0 Answers  


What is enum c++?

0 Answers  


What does it mean to declare a destructor as static?

0 Answers  


How do you find out if a linked-list has an end? (I.e. The list is not a cycle)

0 Answers  


Categories