I think it is compiler dependent i.e, order in which expressions in the function are evaluated.
whether 'left to right' or 'right to left' .
1. If left to right then 0,2,2,2,3,4,4 .
printf("%d %d %d %d %d %d %d", i++, ++i, i, i++, i, ++i, i++);
-------------------->> --------------------------->>
(results printing order) (evaluation order)
2. If right to left
printf("%d %d %d %d %d %d %d", i++, ++i, i, i++, i, ++i, i++);
---------------------->> <<-------------------------------
(results printing order) (evaluation order)
then 4,4,3,2,2,2,0
Note : order of printing the expression is same but the order of evaluation is different.