Re:Why do arrays start at 0?
by divbzero on Wednesday August 24, 2022 @03:11PM
(#32584307)
Or alternatively:
[ Parent
| on HN ]
Unless I am remembering C wrong, this would work but the
for (size_t i = length; i-- > 0 ; ) ...
that several other people posted would not execute for index 0. Shouldn't it be this instead? for (size_t i = length; --i > 0 ; ) ...