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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -