Computer Science, asked by kram13831, 7 hours ago

x =42; x+ = (x++ ) + (++x)+x;​

Answers

Answered by shartaj1412
0

Answer:

174

Explanation:

x+=(x++)+(++x)+x

which is same as x=(x + ((x++)+(++x)+x)

Now with order of prioritty (x++) will be executed first.

x++ will increment the value of x first and return the old value, which is 42

Next ++x will be executed

++x will increment the value first and return the new value, which 44

Now our problem is changes like below

x=44

x=x+42+44+x

Which is 174!

Similar questions