✏️ Explanatory Question

Evaluate the expression when the value of x = 4: \[ x *= --x + x++ + x \]

👁 65 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

The given expression is evaluated as follows:

x *= --x + x++ + x (x = 4)
x *= 3 + x++ + x (x = 3)
x *= 3 + 3 + x (x = 4)
x *= 3 + 3 + 4 (x = 4)
x *= 10 (x = 4)
x = x * 10 (x = 4)
x = 4 * 10
x = 40