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                      
Google
   
 
Categories >> Software >> Programming Languages >> C++ >> C++ General
 
 


 

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

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
What is virtual constructor paradigm? HP 5
How to change constant values? Symphony 6
What is compilation? Datamatics 1
Can we declare destructor as static? Explain?   3
class HasStatic { static int I; }; Referring to the sample code above, what is the appropriate method of defining the member variable "I", and assigning it the value 10, outside of the class declaration? a) HasStatic I = 10; b) int static I = 10; c) static I(10); d) static I = 10; e) int HasStatic::I = 10; Quark 1
What is the difference between static link library and dynamic link library? Tech-Mahindra 7
Can inline functions have a recursion? Give the reason?   2
What is the output of: String a1 = "Hello"; String a2 = "world!"; String* s1 = &a2; String& s2 = a1; s1 = &a1; s2 = a2; std::cout << *s1 << " " << s2 << std::endl; Lehman-Brothers 4
How do you test your code? Microsoft 4
what is the diff b/n c and c++ a. dynamic scoping b. nested switching c. declaration of variables in any code block d. separation of compilation and linking Hughes 2
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D   1
If P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula: The population growth rate is given by the formula: B D Write a program that prompts the user to enter the starting population, birth and death rates, and n, the number of years. The program should then calculate and print the estimated population after n years. Your program must have at least the following functions: 1. growthRate: This function takes its parameters the birth and death rates, and it returns the population growth rate. 2. estimatedPopulation: This function takes its parameters the current population, population growth rate, and n, the number of years. It returns the estimated population after n years Your program should not accept a negative birth rate, negative death rate, or a population less than 2.   1
 
For more C++ General Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com