i++ - 1 .
++i - 1 i, .
:
i++ - 5 1 i make i 6.
i++, . return 5.
++i - 1 i i 6, i= 6
:
int main()
{
int i=5;
while(1)
{
int post, pre;
post = i++;
printf("post : %d, i: %d\n", post, i);
i = 5;
pre = ++i;
printf("pre : %d, i: %d\n", pre, i);
break;
}
return 0;
}
:
post : 5, i: 6
pre : 6, i: 6