Pass by value
A function gets a copy of each argument, so changing a parameter doesn't change the caller's variable. To change it, pass a pointer.
A function gets a copy of each argument, so changing a parameter doesn't change the caller's variable. To change it, pass a pointer.