ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
   
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  C++ General
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
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;  
 Question Submitted By :: Ramesh.chaluvadi
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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;
Answer
# 1
cout<<typeid(e).name() is the correct one 
Is This Answer Correct ?    5 Yes 0 No
Guest
 
  Re: 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;
Answer
# 2
ans:c 
Is This Answer Correct ?    1 Yes 0 No
Santhoo035
[Nan]
 
 
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
What is scope of a variable? (LOLZ) CA2
What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?  3
What is the difference between Char a[ ]=”string” and char *a=”String” Adobe11
What are the basics of classifying different storage types, why? Symphony2
What is difference between initialization and assignment? HP8
write a programming using for loop in c++ to generate diamond trangel? NIIT1
3- Write a program to find larger and smaller of the two numbers. Luminous4
wap to accept 10 numbers & display the number of odd and even numbers??  1
how is returning structurs from functions?Show an eg? GE1
what is pulse code modulation? Wipro2
write program for palindrome Wipro80
What are the total number of lines written by you in C/C++? What is the most complicated or valuable program written in C/C++? Intel2
 
For more C++ General Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com