Comment by bhaak

11 hours ago

They don't. After running, for the values in small_numbers from 0 to smlen-1 they are equivalent.

But if the last value of numbers[] is not smaller than 500, small_numbers[smlen] will contain that value for the first version whereas the second version does not write to small_numbers[smlen].