Computer Science, asked by shhhh59, 7 months ago

x+=x++*++x%2,if x=4​

Answers

Answered by Oreki
1

Answer:

4

Step-by-step Explanation:

> x += x++ * ++x % 2

> x += 4 * 6 % 2

> x += 24 % 2

> x += 0

> x = x + 0

> x = 4 + 0

> x = 4

Answered by anindyaadhikari13
2

\star\:\:\:\sf\large\underline\blue{Question:-}

  • Evaluate the following when x=4.

\star\:\:\:\sf\large\underline\blue{Solution:-}

Given code,

x+=x++ * ++x%2

Or,

x+=4 * 6%2

Or,

x+=24%2

Or,

x+=0

Or,

x=4+0

Or,

x=4

\star\:\:\:\sf\large\underline\blue{Answer:-}

  • The value of x is 4.
Similar questions