So the code looks like this (you can access this fiddle here (Click me):
#include <stdio.h>
int main()
{
int a[5] = { 6, 2, 7, 3, 5 };
for (int i = 0; i < 5; i++){
printf("%d ", i[a]);
}
printf("\n");
for (int i = 0; i < 5; i++){
printf("%d ", a[i]);
}
return 0;
}
And this is the output:
6 2 7 3 5
6 2 7 3 5
Apparently, he made a mistake when indexing the array, and inverted the index variable with the array itself. What he found out is that it still prints the same values. This might be a silly question, but again, I don't know much about these types of cases, and this itches me to find out why it's happening what's happening here.
Thanks