It is given that n=3
Now a[++n] is pre-increment of n, so ++n will first increment 3 and the new value of n becomes 4.
So, a[++n] is nothing but a[4].
Since the value of n is incremented to 4 and in RHS post-increment of n is given, so first, a[4] becomes equal to 4, then the value of n is incremented to 5.
Therefore a[4] = 4, and the new value will now become 5.