Rohan Deshmkh wrote:
I am not able to understand the above code . Why does it print 1?what does a=b do in above code?
(a = b) just makes both the reference a and b point to the same array (Initially pointed by b)
So,
a[(a = b)[3]] is translated to a[b[3]], which will print 1