for some reason the code I am looking at has a lot of something like
char tmp[4];
memcpy(&tmp[0],foo_pointer,bar_size)
I would have expected simply
char tmp[4];
memcpy(tmp,foo_pointer,bar_size)
Is there some reason I am missing in writing it the first way?
No, they’re equal.
The former might be clearer even without the definition of
tmpin sight.(And just to make this answer complete as to why it is so, here’s the interesting bit from a late draft of the standard:)