Following is the code that I run in ubuntu 13.10. Code:-
`#include<stdio.h>
main()
{
int i=10,j=10;
i=i++ + ++j;
printf("i=%d j=%d\n",i,j);
j=++i + j++;
printf("i=%d j=%d\n",i,j);
}
Output:-
i=21 j=11
i=22 j=33
Logically,as per rules ans should be:-
i=22 j=11
i=23 j=35
And when I run this code in ubuntu 12.10 then i get correct ans i.e. above ans. Please explain what is happening??