In C, Array can be represented as pointer and vice versa.
instead of a we can also write *(a+5).
instead of 5[a] we can also write *(5+a).
so, a == 5[a]
if (a == 5[a])
Now come on the explanation -
a means *(a+5) and 5[a] means *(5+a) and we know both are same.