include<stdio.h>
void main()
{
int i=5;
int c;
c=i++ + ++i + i++ + --i;
printf("\n%d",i++ + ++i + i++ + --i);
printf("\n%d",c);
}
The o/p that I'm getting is
31
23
while my friend got
34
20.
Also why are the 2 (printf ' c 'and printf 'expression') values different. Is it because printf evaluation is different from how a normal expression would be evaluated?
thanks in advance.