Consider the following:
int main() {
int a[] = {42, 9001, -1337};
printf("%d, %d\n", a[0], 0[a]);
return 0;
}
I didn't see 0[a] before, but it appears to do the same as a[0] (the same appears to be true for other numbers as well, not just for 0).
Is that my compiler's fault (GCC)? Is there any documentation on this behavior? What purpose does it serve?