i starts off as -1.
Apparently, the arguments of printf are evaluated in reverse order (i++, then ++i), so:
i++ is a postincrement, so it evaluates to i (or -1) before it increments i, making it 0, so the second thing that gets printed is -1.
++i is a preincrement, so it first increments i, making it 1, then evaluates to i, making it 1, which is the first thing printed out.
From this, you can probably tell that, in general, it's not a good idea to use i++ and ++i in a complex operation where you need i more than once because it can be difficult to predict the order it will be evaluated in.