I am getting confusion here,what ia the function call by value and function call by referance.Pl any one clarify this.
Call by Value :
If you pass a parameter to a function using call by value, then any changes that are being made to that parameter inside the function persists only inside the function. Once the function is exitted, the value of the parameter is the same as what was passed to the function.
Call by Reference :
If you pass a parameter to a function using call by reference, then any changes that are being made to that parameter inside the function persists even after function is exitted.
For more details, you can refer any book on any programming language. This is one of the basic concept in programming.
Call By Value :
It craetes a copy of variable within a function and is destroyed once the function ends.
Call By Refrence:
The arguments passed by refrences provides the memory address of the variable and twaeking done with the variable within a function persists even after function ends
By default arguments are passed as a refrences