Evaluate the following java
expression, if x=3, y=5, and
z=10: ++ 2 + y - y + 2 + x ++
24
23
20
25
Answers
Answered by
1
ANSWER:
(a)24
EXPLANATION:
Given :
+ + z + y - y + z + x + +
x = 3,
y = 5,
z = 10
= (++10)+5-5+10+(3++) \\given values
= 11+5-5+10+3
IMPORTANT NOTE: ⚠⚠⚠
(In beginning ++z is the pre-increment so the value will be incremented from 10 to 11 and also the last x++ remains the same because of its post-increment.)
=24
answer of the equation after solving it.
⚠⚠(Pls note that its "z" in the equation and not ✖︎ "2" )⚠⚠
IF HELPFUL PLS DO MARK AS BRAINLIEST
#IRKI♥
Similar questions