In this code first assignment is evaluated which is a=b means value of array b is assigned to a but it will not change the value a its just evaluating.
Second thing is ((a = b))) which means it will look for 4th element in array of a(which contains the value of b after evaluation).
At last it will a[(a = b)] print 1 becuase it will print the 0th element from a.
Just seprate the brackets and you can see but make sure assignment is not done else it will change the value or array a.
Rohan Deshmkh wrote:ok thanks i got it.
a[(a=b)] is equivalent to a[b].
But what here matters is how?? You should try to understand it..
You should probably make a diagram on paper with 2 boxes for array and a & b reference pointing to them..
And then see the change as yo proceed in the code.