posted 23 years ago
Hi,
This code compiles and prints 1.
my doubt is we are passing array reference to the change_i method, why don't the changes made on the reference doesn't affect the actual array. why doesn't the value of i[0] changes to 2.
I thought arrays are treated as object refrence when we pass the whole array.
Can anyone explain?
Thanks,
Vanitha.