Evaluate the expression when the value of x = 2:
x = x++ + ++x + x
10
Initially, x = 2. The expression is calculated as follows:
x = x++ + ++x + xx = 2 + ++x + x (x = 3)x = 2 + 4 + x (x = 4)x = 2 + 4 + 4 (x = 4)x = 10