I was searching pointers in C and on a given website I found the following usage:
int main() {
int i;
int array[5] = {10, 20, 30, 40, 50};
for(i = 0; i < 5; i++) {
printf("%d\n", i[array]); /* Instead of "array[i]"" */
}
return 0;
}
How does it happen and why does printf
function understand this?