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

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -