After the declaration and defination:
int a[] = {1, 2, 3, 4, 5 };
a + i equals i + a, they are pointers with the same value pointed to the array element a[i],
so a[i] = i[a],(0 <= i < 5)。
#include <stdio.h>
#include <stdlib.h>
int main(void){
int a[] = {1, 2, 3, 4, 5};
printf("After the declaration and defination int a[] = /{1, 2, 3, 4, 5/}/n");
printf("a[1] = %d/n", a[1]);
printf("1[a] = %d/n", 1[a]);
}
The output is :
After the declaration and defination int a[] = {1, 2, 3, 4, 5}
a[1] = 2
1[a] = 2