+ 2
Please illustrate me the concept of call by value and call by refrence
call by value and call by reference
2 Respostas
+ 12
Whats the difference between call by value and call by reference ?? [In detail]
in this question u will find the answer
+ 1
to be short...
Call by value is the classic method in a function call. Inside the function is created a local copy of variable you pass to the function and any operation and/or mldification inside the function is done on the local copy. When the function ends the local copy is destroyed. The original variable cannot be modified.
Call by reference implys to pass a function the memory location where the variable is stored. Any change is done on the original memory location and, at the end of function, the variable the modifications on the variable are effective. The variable passed can be modifyed by the calling function.