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 Hamed Naeemaei for What's the difference between passing by reference vs. passing by value?

$
0
0

Take a look at this photo:

In the first case (pass by reference), when the variable is set or changed inside the function, the external variable also changes.

But in the second case(pass by value), changing the variable inside the function has no effect on the external variable.

for read article see this link.

Call by reference vs call by value


Viewing all articles
Browse latest Browse all 19

Latest Images

Trending Articles





Latest Images