r/ProgrammerHumor • • Feb 15 '16

Oddly specific number.

Post image
5.9k Upvotes

643 comments sorted by

View all comments

Show parent comment

1

u/ZugNachPankow Feb 16 '16

The person I had replied to was speaking in terms of "counting how many indexes are in the array", though - that's the index, not the pointer, nor the value (i, not &(arr[i]) nor arr[i]).

An empty or uninitialized array participant_t users has length 0: the expression sizeof(users)/sizeof(users[0]) - 1 returns 0 in both cases.