Call-by-reference vs. Call-by-value in programming

Generally speaking, in computer programming, a parameter is a special kind of variable, used in a function declaration to refer to one of the pieces of data provided as input to that function. These pieces of data, in turn, are called arguments. Therefore, in order to make a clear distinction between them, the argument is the actual value passed to a function, procedure, or method, whereas the parameter is a reference to that value inside the implementation of the function. The act of transmitting parameter values to and/or from a called function is known as “parameter passing”. The way that the arguments are evaluated and passed to the function depends on the programming language and the kind of parameter passing mechanisms it uses. Two very common mechanisms used in many programming languages are call-by-reference and call-by-value.

Read More…

 Scroll to top