Classical

Object Oriented Programming - Object Modelling

91:  
If container classes are carefully constructed, then these tools are available to work with structures that are not
A.

valid without container classes

B.

programmer-defined

C.

type-specifc

D.

public

 
 

Option: C

Explanation :


92:  
To multiply two private data members of two separate objects that are of the same class, a friend function is created to do the multiplication. Then
A.
use this pointer for both objects within the function
B.
use this pointer for one of the objects within the function and pass the other object 
C.

pass both objects to the function

D.
call the function twice, passing one object each time
 
 

Option: C

Explanation :


93:  
When declare a member of another class to be a friend, which of the following must be used ?
A.

Keywork friend

B.

Scope resolution operator

C.

Both (a) and (b)

D.

None of these

 
 

Option: C

Explanation :


94:  

You can bestow friendship on

A.

a function that is a member of another class

B.
several functions that are members of another class
C.

all functions that are members of another class

D.

All of these

 
 

Option: D

Explanation :


95:  
Which of the following grants friendship to the class Student?
A.

friend Student;

B.

friend Class Student;

C.

either (a) and/or (b)

D.

None of these

 
 

Option: C

Explanation :




Suggest an improvement