I am trying to understand why the following piece of code produces the output of 7
.
int main()
{
int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
int b[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
int c = 5;
int *p = a;
printf("%d", (c[b])[p]);
return 0;
}