The call by value is used in c and the changes made to the variables of the callled function are not reflected back to the calling function .....however call by refrence uses addresses and pointers and the changes made to the variables in the called function are reflected back to the calling function
Explain the difference between call by value and call by reference in c++ with suitable example
In call by value the value of the variable passer to the function and it does not return any value
In call by reference the address of the variable is passed to the function and therefore any change made in the function is permanent since it affects the memory location
In call by reference the address of the variable is passed to the function and therefore any change made in the function is permanent since it affects the memory location
Call by reference is used to reflect the modification of value in actual parameter which has been assigned as an argument to a function after coming back from the called function. It is used in VB with the keyword ByRef.
Call by value is used to secure the value of the actual parameter which has been used as an argument to a function after coming back to to calling function. VB provide this service with ByVal keyword
Call by value is used to secure the value of the actual parameter which has been used as an argument to a function after coming back to to calling function. VB provide this service with ByVal keyword
The difference between Call by value and Call by reference in a function is that call by values mean that by passing the value in local variables might loose their values because of the stack operation
While call by reference mean that they can retain their values by sending the
address of variable.
Read more LINK