Exception Handling

21.Which statement is used to catch all types of exceptions?

A. Catch()
B. Catch(Test t)
C. Catch(…)
D. None of the above

View Answer


22.How to handle error in the destructor?

A. Throwing
B. Terminate
C. Both throwing & terminate
D. None of the above

View Answer


23.What kind of exceptions are available in c++?

A. Handled
B. Unhandled
C. Static
D. Dynamic

View Answer


24.Which of the following is true about exception handling in C++?
i) There is a standard exception class like Exception class in Java.
ii) All exceptions are unchecked in C++, i.e., compiler doesn't check if the exceptions are caught or not.
iii) In C++, a function can specify the list of exceptions that it can throw using comma separated list like following.

A.Only i,iii
B.Only i,ii
C.Only ii,iii
D.All of the above

View Answer


25. What is the basic of grouping standard exception classes,in c++?

A. Catch
B None of these
C. Error
D. Namespace std

View Answer


26.What is a count of standard exception?

A. 9.0
B. 5.0
C. 6.0
D. 7.0

View Answer


27.What should be included in try block in c++ programming language

A. Static value
B. Dynamic allocation
C. None of the above
D. Const value

View Answer


28.How many standard exception exist in c++

A. 9.0
B. 5.0
C. 6.0
D. 7.0

View Answer


29.Catch-all handlers uses which operators in c++?

A. String operators
B. Ternary operators
C. Ellipses operators
D. Unary operators

View Answer


30.Uncaught exception will call which function?

A. Terminate
B. Catch
C. None of the above
D. Throw

View Answer


31.Which operator in c++ programming language , is used by catch-all handler

A. Ellipses operator
B. Ternary operator
C. String operator
D. Unary operator

View Answer


32.How to handle exception in constructor, in c++?

A. We have to return an exception
B. We have to throw an exception
C. Both A and B
D. None of the above

View Answer


33.How many parameter does the throw expression has, in c++?

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

View Answer






Also check :


Discussion


* You must be logged in to add comment.