Pass By Value: In Pass by value, function is called by directly passing the value of the variable as an argument. So any changes made inside the function does not affect the original value. In Pass by value, parameters passed as an arguments create its own copy.
Is it possible to pass a variable by reference?
It does not mean simply that it’s possible to pass a reference to a modifiable object. Instead, it means that it’s possible to pass a simple variable in such a way as to allow a function to modify that value in the callingcontext. So: