Defined this way, we can do neither ++x++
nor ++x--
. But on the other hand, both (++x)++
and (++x)--
are useful expressio
Both (++x)++
and (++x)--
invoke undefined behaviour [assuming x to be a primitive type]. For user defined type the scenario would be different. However it is not generally recommended to use such confusing expressions in your code.
As far as the precendence is concerned this answer explains why post increment has higher precedence than pre increment.