Classical

Object Oriented Programming - Object Modelling

41:  

Static data members

A.

should be initialized like global variables.

B.
has only one copy of it exists for all instances of a class.
C.

should be initialized like extern variables.

D.

both (a) and (b)

 
 

Option: D

Explanation :


42:  
Which of the following statements are true?
I. Constructors can be vitrual.
II. Destructors can't be virtual.
A.

Both the are true.

B.

Both are false

C.

I is true and II is false

D.

II is true and I is false

 
 

Option: B

Explanation :


43:  

Which of the following statements are correct?

I. Non-canst object can't call constant member function.

II. Constant objects can't call non-constant member function.

III. A constant object can change non constant member function.
IV. A constant object can't change non-constant member function.
A.

Both I and IV

B.

Both II and III

C.

All of these

D.

none of these

 
 

Option: D

Explanation :


44:  

Dynamic destruction is

A.

destruction of created objects.

B.
deallocation of memory when the object goes out of scope
C.

simply memory deallocation

D.

run-time memory deallocation

 
 

Option: B

Explanation :


45:  

Nested class is a/an

A.

class declared inside another class declared

B.

derived class

C.

abstract class

D.

none of these

 
 

Option: A

Explanation :




Suggest an improvement