1. In case I the method used is Call by value and in Case II is Call by reference.
2. There are two methods they are call by value and call by reference
a. call by value:
In call by value method, a copy of the actual parameters are passed to the formal parameters. If the function makes any change it will not affect the original value.
b. call by reference:
In call by reference method, the reference of the actual parameters are passed to the formal parameters. If the function makes any change it will affect the original value.