✔ 最佳答案
1) pass-by-value
When a calling program passes a var to a called prog/function by value, the called one will copy its content to a local var and use it. Which means that the 2 vars are in different memory locations even though they have the same name. If the called prog/func changed the value of this var, it will not be reflected when returning to the calling program.
2) pass-by-reference
When a calling program passes a var to a called prog/func by reference, it passes a pointer with the address of this var to the called one. Which means that the var used by the called prog/func has the same memory location with the var in the calling program. If the called prog/func changed the content of this var, after returning, the calling program will have the var with the updated value.