v2 doesn't because --num is after cout. The while loop is only entered when num >= 0 so the minimum value of num within the loop is 0 which is displayed, then decremented to -1 so the while loop terminates and no further values are displayed.
The difference between 1) and 2) is obviously the position of --num which affects the value displayed.