Quantcast
Channel: What's the difference between passing by reference vs. passing by value? - Stack Overflow
Viewing all articles
Browse latest Browse all 19

Answer by Monster for What's the difference between passing by reference vs. passing by value?

$
0
0

In short, Passed by value is WHAT it is and passed by reference is WHERE it is.

If your value is VAR1 = "Happy Guy!", you will only see "Happy Guy!". If VAR1 changes to "Happy Gal!", you won't know that. If it's passed by reference, and VAR1 changes, you will.


Viewing all articles
Browse latest Browse all 19

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>