Computer Science, asked by krisharora28, 8 months ago

Evaluate the followign Java Expression if x = 3, y = 5 and z = 10 ++z + y - ( --y) + ( --z) + x ++

A  25

B  24

C  23

D  22

Answers

Answered by sumanbothra457
5

Explanation:

The answer is 23

10+10+5-(-5)+(-10)+3

=25+5+(-7)

=30-7

=23

hope this will help you

Answered by Agastya0606
0

The correct answer is option (c) 23.

  • The given expression is ++z + y - ( --y) + ( --z) + x ++, where ++Z means that the value will first increment by 1, and its final value will be used in the expression, and x++ means that the original value of x will be used and after that, it will be incremented by 1.
  • Now, putting the values in the expression ++z + y - ( --y) + ( --z) + x ++ = 11+5-4+9+3 = 23. Hence, the value of the expression is equal to 23.

#SPJ3

Similar questions