Object Oriented Programming

1:

One of the disadvantages of pass-by reference is that the called function may inadvertently corrupt the caller's data. This can be avoided by  

A.

passing pointers

B.

declaring the formal parameters constant

C.

declaring the actual parameters constant

D.

all of the above

 

Answer : B

Explanation :

If the formal parameters are declared constants, the compiler will not allow any changes to be made. So the question of   inadvertently corrupting the caller's data, does not arise at all.

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.