Hi all,
I bought the 2-volume C for Dummies books a long time ago and now a few years later, I have decided I am going to thoroughly learn pointers once and for all! Anyway, I've been going through the pointer chapter and haven't been having too much trouble so far, but then one of the exercises at the end of the section has me a bit stumped.
The exercise asks to match the array notation to its pointer notation equivalent.
So:
array[0] is equivalent to *a
array[1] is equivalent to *(a+1)
array[x] is equivalent to *(a+x)
No problems with these, but then:
array[i+2] is equivalent to *(i+2)
Where did this come from? Why wouldn't it be something like:
array[i+2] is equivalent to *(a+(i+2))
Or is this some sort of typo in the book?
Thanks!