1.

Difference Between Call By Value And Call By Reference?

Answer»

Call By Value:creates a new memory location for use WITHIN the subroutine. The memory is freed once it leaves the subroutine, CHANGES made to the variable are not AFFECTED outside the subroutine.

Call by Reference : PASSES a pointer to the memory location. Changes to the variable within the subroutine AFFECTS the variable outside the subroutine.

Call By Value:creates a new memory location for use within the subroutine. The memory is freed once it leaves the subroutine, changes made to the variable are not affected outside the subroutine.

Call by Reference : passes a pointer to the memory location. Changes to the variable within the subroutine affects the variable outside the subroutine.



Discussion

No Comment Found