Possible Duplicate:
In C arrays why is this true? a[5] == 5[a]
While coding in C, I accidentally found that the code below correctly prints the elements of array A:
int A[] = {10, 20, 5, 32, 40};
for(int i=0; i<5; i++)
printf("%d \n", i[A]);
So i[A]
acts likeA[i]
.
Why? what is the logic behind this behavior?