3 ms·
Or alternatively: size_t i = length; while (i--) ...
by divbzero 4y ago
Or alternatively:
size_t i = length;
while (i--) ...
- jecel 4y agoUnless 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 ; ) ...