Hi,
Yah what you expected is correct, but it is not like that.See the operators precedence.
Higher :[]
Lower: =
So first a[i] gets evaluated and the assignment from right to left.
I would like to convey one message to all.Since we are all beginners, the basic thing in learning any language is to make sure we are well aware of "Operators Precedence".That solves many problems.
Thanks,
Jana