Ask your own question, for FREE!
Computer Science 14 Online
OpenStudy (anonymous):

What is the difference between call by value and call by reference in a user defined function in C++?

OpenStudy (anonymous):

The value of the actual parameters in the calling function do not get affected when the arguments are passed using call by value method, since actual and formal parameters have different memory locations. The values of the formal parameters affect the values of actual parameters in the calling function, when the arguments are passed using call by reference method. This happens since the formal parameters are not allocated any memory, but they refer to the memory locations of their corresponding actual parameters.

OpenStudy (anonymous):

Thanks

OpenStudy (anonymous):

NP :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!