This is an assignment and a question for measuring basic knowledge on C. It is part of a course on Coursera.org. But, this is just to measure if you are able to do the course. This is just a copy-paste of the actual question. I did great on all other question, I just don't seem to get the following one :
Suppose you are compiling for a 32-bit platform and sizeof(int) == 4. Which one of the following is equivalent to c[b] if c is of type int* and b is of type int?
Possible answers:
-1 * b[c]
*(c+b)
none of the above
*c+b
c[b][0]
What I am asking is, what the right answer is from the above possibilities, and why? I mean what logic does one use to arrive at the result? What should I read to understand the procedure to get there ?