In C++, given that i is the index of the array arr[n], why do those lines of code work
for (int i=1;i<=n;i++)
{printf("%d ", i[arr]);}
In normal cases, it should be arr[i] instead of i[arr], but my teacher used i[arr] and it still worked and require us to explain it, but I just can't figure it out. Can anyone explain this, thank you so much!