Classical

Object Oriented Programming - Object Modelling

86:  

The argument of a copy constructor is passed by

A.

argument

B.

reference

C.

pointer

D.

both (a) and (c)

 
 

Option: B

Explanation :


87:  

Syntax of the delete as delete object will

A.

release memory allocated to dynamic object

B.
invoke the destructor of the class if it exits as a part of object destruction activity.
C.

release memory statically.

D.

both (a) and (b)

 
 

Option: D

Explanation :


88:  
Consider the prototype declared within the Item class:
Item addItems (const Item anItem);
This function returns
A.

nothing

B.

void

C.

an object of the Item class

D.

a pointer to an object of the Item class.

 
 

Option: C

Explanation :


89:  

If Missys Class is a friend of Harry Class, then

A.
all members of Missys Class are friend of Harrys Class
B.
all members of Harrys Class are friends of Missay Class
C.

Both (a) and (b)

D.

none of these

 
 

Option: A

Explanation :


90:  
If a function is needed to access two or more instances of the same class, then which of the following can be used ?
A.

Class member function

B.

Friend function

C.

Either (a) or (b)

D.

None of these

 
 

Option: C

Explanation :




Suggest an improvement