yes the above que's output will be compiler dependent but if we ignore the compiler issue it will be solve.
when we are working with printf statement and it contain multipal argument then it always execute from left to right because it work with the help of stack. In printf statement data need to be pass toward right to left & data need to be print toward from left to right.(LIFO).
initial the value x =20, first execute right to left ++x is preincrement it gives 21 and push into stack. now new value of x=21,
now x-- post decrement which push old value of x 21 push into stack then decrement the value of x=20(new value of x);
TOS cantain 21, pop all we get 21,21.as output and value of x is 20