Computer Science, asked by honeyajeesh2017, 9 months ago

write the output. ++x + x++ + x--​

Answers

Answered by lostworldearth
1

Answer:

Say if you X = 10

Explanation:

then

++x + x++ + x--​

11+11+12

IDK which language you are using tho

login

steps

1 x = 10

2 ++x = 11 used

3 x ++ = 11 used

4 x = 12

5 x-- = 12 used

6 x = 11

final value of x if printed will be X = 11

but sum of your question is

34

FYI

++x/--x --> increments value, then executes statement

x++/x-- --> executes statement, then increments value

but some compiler print from reverse if you do

something like this

print(x+++x--x++)

then right most (last)  will be executed first.

followed by going left hand side

Similar questions