I am unable to understand call by value and call by referance concept | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I am unable to understand call by value and call by referance concept

16th May 2017, 1:28 AM
muhammad ahmad
muhammad ahmad - avatar
2 Answers
+ 7
Here is a good article on this topic you may find interesting http://www.cplusplus.com/forum/lounge/62708/
16th May 2017, 1:43 AM
jay
jay - avatar
+ 3
Value: I only care about the value. What x is equal to. Reference: I only care about the variable. X. Since passing reference only cares about the variable, you can change the actual value of the variable by passing the reference. However, for passing by value I cannot change the variable itself, only use the value of the variable however I like.
16th May 2017, 3:00 AM
Rrestoring faith
Rrestoring faith - avatar