Hi, what happened in that program is after you created arr2 is you just told the compiler that arr2 is equal to arr Remeber, the compiler reads line by line, so after the you created the arr2 with the index of 4, you equalized it to arr, so arr2 now has a new value. thats why when you accessed arr2[4], the output is 5.
thats it,...
hope it helped you,