KnowledgeBoat Logo
|

Computer Applications

Differentiate between CALL by reference and CALL by value.

User Defined Methods

13 Likes

Answer

Call by valueCall by reference
Actual parameters are copied to formal parameters.Formal parameters refer to actual parameters.
Any changes to formal parameters are not reflected onto the actual parameters.The changes to formal parameters are reflected onto the actual parameters.
All primitive data types are passed using Call by value.All reference data types like arrays and objects of classes are passed using Call by reference.
It is used to keep original data secure and unchanged.It is used when the original data values need to be modified.

Answered By

7 Likes


Related Questions