Yes, that's right, except for one small misconception. In your example:
for (i=0;i<5;i++) S.o.p(i);
o/p is 01234
for (1=0;i<5;++i) S.o.p(i);
o/p is 01234
The output is the same whether you use the pre- or post-increment. The expression ++i or i++ is evaluated at the end of every loop cycle.
Your working for the main problem:
for(i=0,j=0;i+j<20;++i,j+=i--) S.o.p(i+j);
is correct except that the output will start at 0.
0
1
2
3
...
19
as the expression ++i,j+=i-- is only evaluated at the end of every loop cycle, therefore the initial value is 0.