Question: what is the difference between call by reference and call by value explain with example?
Answer: Call by Reference: Both the actual and formal parameters refer to same locations, so any changes made inside the function are actually reflected in actual parameters of caller. While calling a function, we pass values of variables to it. Such functions are known as “Call By Values”.