int x=10;
do{
x++;
}
while(x++ > 12);
printf("%d",x);
first we are having x=10;
As we know in do-while loop, first time code inside 'do' will run without checking while condition. so x++; will make x=11.
Now it will check while condition i.e while (x++ > 12)
Here x++ is post increment so x will remain 11 and it will check condition (11 > 12) and condition fails here. so it will exit do-while loop.
but because of post increment x will be increment by 1. now value of x is 12.
So at last
printf statement will print 12 as output.