In C, Array can be represented as pointer and vice versa.
so, instead of a[5] we can also write *(a+5). instead of 5[a] we can also write *(5+a).
so, a[5] == 5[a]
main() { int a[]={1,2,3,4,5,6,7,8}; if (a[5] == 5[a]) printf("Equal"); }
Now come on the explanation - a[5] means *(a+5) and 5[a] means *(5+a) and we know both are same.