Classical

Object Oriented Programming - Object Modelling

106:  

A friend function

A.
receives a this pointer for the class that makes it a friend
B.

receives a this pointer for any class that uses it

C.
receives a this pointer for any class object passes to it
D.
does not have a this pointer for the class that makes it a friend
 
 

Option: D

Explanation :


107:  

The generic type in a template function

A.

must be T

B.

can be T

C.
cannot be T for functions you create, but may be for C++'s built-in function
D.

cannot b T

 
 

Option: B

Explanation :


108:  
When a function tries to access an object's private data member,
A.
if function is a member function, then access is approved
B.
if function is a friend function, then access is denied
C.

Both (a) and (b)

D.

None of these

 
 

Option: A

Explanation :


109:  
The prototypes for friend functions are most often listed in the
A.

private declaration section

B.

public declaration section

C.

implementation section

D.

none of these

 
 

Option: D

Explanation :


110:  
The prototypes for friend functions must be listed in the
A.

private declaration section

B.

public declaration section

C.

implementation section

D.

none of these 

 
 

Option: D

Explanation :




Suggest an improvement