News for hackers. Stuff that matters.
Re:Why do arrays start at 0? by divbzero on Wednesday August 24, 2022 @03:11PM (#32584307)
Or alternatively:

  size_t i = length;
  while (i--) ...
Re:Why do arrays start at 0? by jecel on Thursday August 25, 2022 @04:59PM (#32599864)
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 ; ) ...