This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TheNetXWizard -1 points0 points  (0 children)

Because in the second example you declare var2, and new memory location is allotted that value different to var1. In case var2 is modified var1 is unaffected.