Object Oriented Programming - Object Modelling - 2

41:  
When an object-oriented program detects an error within a function, the function
A.

throws an exception

B.

throws a fit

C.

catches a message

D.

catches an exception

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



42:  

A predefined function that may be used to handle memory allocation errors is

A.

handle_error

B.

set_new_handler

C.

new_fix

D.

memory_error

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



43:  

The C++ operator used to allocate memory is

A.

mem

B.

allocate

C.

new

D.

create

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



44:  

The primary purpose of exception specification is

A.

documentation

B.

object-orientedness

C.

structure

D.

reduction of code.

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



45:  
Which of the following can be thrown in a C++ program?
A.

Scalar variables

B.

Programmer-defined objects

C.

Both (a) and (b)

D.

None of these

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here: