c - When passing the address of the first element in an array, why write &Array[0] instead of Array? -


in many code examples find, use "&array[0]" if array has passed function. there reason ? write "array".

this pure style issue, , should whatever dev team prefers. use plain old array , if want offset n elements array + n. people find confusing , use &array[n], when n == 0.

in defense of other side array + n syntax requires know more c in order understand it. involves both arrays degenerating pointers, , pointer arithmetic. in view, c programmers need know stuff anyway, it's not complicated language.


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -