Value versus Reference parameters

Value:
  1. Passes a value to the function. This value is stored in a separate memory cell for the duration.
  2. On leaving the function, the memory cell is returned to available space.
  3. Changes made to the variable in the function do not affect the value in the main program.
Reference:
  1. The address of the variable is passed to the function.
  2. Changes made to the variable in the function affect the value in the main program.
Passing by reference is faster and takes less space. Why ever pass by value?
  1. To protect against inadvertent modification of a variable.
  2. To force the developer to understand what should be done with the variables.