Computer Science, asked by Sumitop, 9 months ago

1. int x = 8; +1=9+1=10+1=11+1=12
float y= x++ * ++X - ++X + X++;​

Answers

Answered by sswaraj04
0

Answer:

pre increment operator ++x first increases the value then perform operation while post increment operator first perform any operation then changes the value before next operation

Here, x++ gives value 8 for multiplication

now for ++x value of x reached is 9 (increased due to prev. operation of x++ ) and now value will increase by 1 more

so final value is 10

so 8 * 10 = 80

now value of x is 10

furthur ++x gives 10 + 1 = 11

80 - 11 = 69

value of x is 11

now x++ gives value 11 for addition operation and increases value later

69 + 11 = 80

now value of x is 12

in one line,

8 * 10 - 11 + 11 = 80

so answer is 80

Explanation:

Hope it helps :-)

Similar questions