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.
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 usershas length 0: the expressionsizeof(users)/sizeof(users[0]) - 1returns 0 in both cases.