What is the most readable way of using address of an array element?
I usually see &array[n]
but I personally think array+n
looks cleaner and more readable.
What do other C coders prefer?
Tell me more
×
Programmers Stack Exchange is a question and answer site for
professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.
|
|||||||
|
IMHO "address of an array element", when written in C, turns into P.S. For those that also use other languages, this has the added benefit of also working with e.g. C++ |
|||
|
If it is not nailed down by the coding standards, then I prefer to use &array[n] as I find I am ...
Hope this helps. |
|||
|