Pass by value means that a copy of the actual parameter is passed to the function when the function is called, so that the actual parameter is not affected if the parameter is changed.
Pass by reference refers to that the address of the actual parameter is directly passed to the function when the function is called. Then the modification of the parameter in the function will affect the actual parameter.
Reference: blog.csdn.net/w372426096/…