pass by value
The function gets its own copy of the argument.
When a parameter is a plain (non-reference) type, it is initialized as a copy of the argument, so changes inside the function do not affect the caller's variable.
See also
The function gets its own copy of the argument.
When a parameter is a plain (non-reference) type, it is initialized as a copy of the argument, so changes inside the function do not affect the caller's variable.
See also