Computer Science, asked by tasmiyahfatima38, 7 months ago

if x=5 then x+=(++x) +(++x) +(x--)., ​

Answers

Answered by nk2139530
2

Explanation:

Using what I know of post-increment and pre-increment in programming, I would use the following reasoning:

++x, you increment the number contained in ‘x’ and then use the variable itself for whatever reason.

x++, you use the variable itself for whatever reason, and then you increment the number contained in ‘x’.Let’s solve your equation now:

x = 3;

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

++x would increase ‘x’ by one and use this value. If you add 1 to the current value of x, which is 3, then you have 4.

x = 4 + (++x);

++x would increase ‘x’ by one again and use (again) this value. If you add 1 to the current value of x, which is 4, then you have 5.

x = 4 + (5);

Sum the remainders, and the solution of your question would be:

x = 9;

Answered by rronak389
2

Answer:

9

Explanation:

Similar questions