L02 ? Week 2 does not have L02 slide deck.
If if helps, the following are equivalent
p[1]
*(p+1) - Compiler takes care off figuring out size of type. The RHS of + is scaled by the sizeof(T).
(void*)p + sizeof(T) - Programmer has to figure out size of type. Note the case of p type to void*. So now any value to RHS of + has to be in bytes.
-----------------------------------------------------------------
If so, I realized what I said may come of as saying
p[1] = *(p+4).
But that was not my intention.
I was thinking in terms of value.
The address of p[1] is the address + integer value 4.
e.g.,
p = 0x80. I am thinking p[1] = *(0x80 + 4)
Thanks; I have added some clarification in the description now.