Mask-group

Difference Between Call by Value and Call by Reference

Difference Between Call by Value and Call by Reference



No.

Call By Value

Call By Reference

1

A copy of value is passed to the function.

An address of value is passed to the function.

2

Changes made inside the function is not reflected on other function.

Changes made inside the function is reflected outside the function also.

3

Actual and formal arguments will be created in different memory location.

Actual and formal arguments will be created in some memory location.

Example of Call by Value:

Example of Call by Reference: