Object Oriented Programming - Object Modelling - 2

111:  
When the function char some Function (int x) is  executed,
A.

it will throw nothing

B.

it will throw an integer

C.

it will throw a character

D.

it may or may not throw anything.

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



112:  
If an integer object is thrown with a throw statement, then a subsequent catch block has a usable match if type ofthe catch argument is
A.

const int &

B.

int &

C.

either (a) or (b) above

D.

with an argument identical to that thrown.

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



113:  
A default exception handler can be coded by creating a catch block with.
A.

no arguments

B.

a void argument

C.

an ellipsis as its argument

D.

an argument identical to that thrown.

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



114:  
If a class object is thrown with a throw statement, then a subsequent catch block has a useable match if the type of the catch argument is
A.

a parent class of the thrown class

B.

a child class of the thrown class

C.

either (a) or  (b)

D.

none of these

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



115:  

Any exception specification appears in

A.

main () program

B.

a catch block

C.

a try block

D.

header of a function that throws an exception.

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here: