Computer Applications

Differentiate between call by value and call by reference.

User Defined Methods

45 Likes

Answer

Call by valueCall by reference
Actual parameters are copied to formal parameters. Any changes to formal parameters are not reflected onto the actual parameters.Formal parameters refer to 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.

Answered By

27 Likes


Related Questions