News for hackers. Stuff that matters.
Re:C Questions and Answers by anon4 on Wednesday March 04, 2015 @02:47AM (#9143166)
just fucking use

  for(i = 0; i < length; i++)
    .. do something with (length - i - 1) ..
I've been much happier since I started writing all loops as incrementing loops.
Re:C Questions and Answers by cbsmith on Wednesday March 04, 2015 @03:03AM (#9143199)

    for (i = 0; i <= length; i++)
        .. boy I sure hope length is not a max value ..
It's not about the incrementing vs. decrementing so much as the equality bounded loop on a value that could be a min/max value. Gets you every time.