What is difference between pass by value and pass by reference?
pass by value and reference
866
09-Jul-2018
Prakash nidhi Verma
10-Jul-2018Pass by value :
In this we pass copy of actual variables in function as a parameter. Hence any modification on parameters inside the function will not reflect in the actual variable.
example:
Pass by reference :
In this we pass memory address by a reference its actual variables in function as a parameter. Hence, any modification on parameters inside the function will reflect in the actual variable.