Ah yes, the goes-to operator -->
Re:Why do arrays start at 0?
by tomjakubowski on Wednesday August 24, 2022 @02:50PM
(#32584020)
And the wink operator, so the compiler knows you know the deal
I like how GP is called "operator-name" and instead of doing himself, he makes others joking with operator names. Although I'm not sure if it's altruism or highly manipulative behaviour.
Gold - have an upvote!
Or alternatively:
size_t i = length;
while (i--) ...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 ; ) ...
In the majority of cases, counting down is not necessarily. Nor is ordered iteration. Most languages have a `for each` style syntax that's preferable anyway.