Take this example:#include int main (){ int a [5]; a [3] = 1111; printf ("3[a] = %dn", 3[a]); return 0;}You notice that I use 3[a] instead of a[3], however, this code works fine but I don't know how.It will be grateful if someone explians to me why and how this code works fine.Thanks.
-
Interview Candidate
- Nov 14th, 2006
- 5
- 2127
Showing Answers 1 - 5 of 5 Answers
Take this example:#include int main (){ int a [5]; a [3] = 1111; printf ("3[a] = %dn", 3[a]); return 0;}You notice that I use 3[a] instead of a[3], however, this code works fine but I don't know how.It will be grateful if someone explians to me why and how this code works fine.Thanks.