Question: Difference between pass by reference and pass by value? 

Answer: You should specify more the programming language context.\n\nIn general, passing by value means the subprogramme that receives the value gets a copy and cannot, thus, modify the original variable used by the caller. It's often said that the function may not produce side-effects.\n\nPassing by reference allows for side effects.\n\nBut many languages make this a little more complicated. You may pass a "reference" or a "pointer" by value, which means that the original pointer will still point to the same object/memory area when the subprogramme returns. But if the pointer is not marked constant, then the contents pointed to may suffer changes.
This question from the Yahoo Q&A forum is categorized in the topic: Family & Relationships