C++ Call by value

In the call by value, the actual arguments are copied to the formal arguments. So any changes made inside functions are not reflected in actual parameters of the caller.

Output