Object Oriented Programming - Object Modelling - 2

21:  

A constructor must provided for a derived class

A.

always

B.

if base class contructor required arguments

C.
if the base class constructor does not required argumens
D.

never

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



22:  
The prototype for a derived class constructor may include arguments for
A.

data members of the derived class

B.

data members of the base class 

C.

Both (a) and (b)

D.

None of these

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



23:  
For only one memory location to be reserved for a class variable, no matter how many objects are instantiated, you should declare the variable should be declared as
A.

static

B.

unary

C.

dynamic

D.

volatile

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



24:  
A function that is called automatically each time an object is created is a (n)
A.

constructor

B.

contractor

C.

builder

D.

architect

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



25:  
A class named student must have a constructor whose name is
A.

student

B.

constructor

C.

any legal C++ name

D.

none of these

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here: