Answers

2014-08-25T01:20:07+05:30

This Is a Certified Answer

×
Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
In procedural languages, C , C++ etc. we have some mechanisms for passing (formal) parameters to a function.

  When a function takes in a parameter and computes result and passes back as the return value, we need to use the mechanism of call by value. In this mechanism, any modification of the value of parameter inside the called function is not reflected to the calling function. ANy modifications to be done by called function can be in global data or the return value.

  When a function takes in a parameter as call by reference, the change in the parameter value itself is not reflected in the calling function.  Actually, the memory address of the variable of interest is passed to the called function. So using that address, the called function can modify the data in that memory address. This modification is useful to the calling function.


1 5 1
2014-08-25T12:01:34+05:30
In call by reference you will get the instance of a variable. After changing parameters of function, in this case your variable will change in call method. In call by value you will get the copy of the instance. And in this case changes of parameter variable will not influence on variable that was in call method
0