Computer Science, asked by shivanshsavita24, 7 months ago

int x=5and y=6then 1. into z=x++ + y++ + ++x;​

Answers

Answered by pavithranatarajan855
0

Answer:

18

Explanation:

z=5+6+7

z=18

x++ is post increment so first value is added then increment so here value is 5.

after this statement x value is 6

y++ is post increment so first value is substituted then increment so there value is 6.

after this statement y value is 7.

++x is preincrement so first incremented then substituted so x+1=6+1=7 will be substituted.

so z=x++ + y++ + ++x =18

Similar questions