Passing by value makes a copy of the data, passing it on the stack to the function. That means changes to the data in the function will not change the original data after the function returns
Passing by reference passes the address of the data, which means changes to that data in the function will persist after the function ends
cosmos
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment