I don’t get what would be the desired effect of your 4th parameter.
You didn’t say what would be the expected output for those 4 arguments.
We can’t interfere w/ how the iterator i
progresses!
It should be always: for (int i = 0; i < len; ++i)
.
Your output now is full of 0
s: 3 0 5 0 7 0 9 0 4 0 6 0 8 0