Programming - C++ Language

You Are Here :: Home > C++ Language > Exceptions - General Questions

 
1.

Which alternative can replace the throw statement?                        


A. for B. break
C. return D. exit




2.

What are the disadvantages if use return keyword to return error codes?                        


A. You have to handle all exceptional cases explicitly B. Your code size increases dramatically
C. The code becomes more difficult to read D. All of the mentioned




3.

What is most suitable for returning the logical errors in the program?                        


A. Use contructor and destructor B. Set a global error indicator
C. Use break keyword D. none of the mentioned




4.

What is the use of RAII in c++ programing?                        


A. Improve the exception safety B. Terminate the program
C. Exit from the block D. None of the mentioned




5.

How many levels are there in exception safety?                        


A. 1 B. 2
C. 3 D. 4




6.

Pick out the correct statement for error handling alternatives.                        


A. Terminate the program B. Use the stack
C. exit from the block D. none of the mentioned




1

2

3

next »

 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on