Hacker News new | ask | show | jobs
by divbzero 1393 days ago
Or alternatively:

  size_t i = length;
  while (i--) ...
1 comments

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 ; ) ...