Computer Applications

Evaluate the following expressions, if the values of the variables are a = 2, b = 3 and c = 3

i. a - (b++) * (--c)

ii. a * (++b) %c

Java Operators

ICSE 2007

176 Likes

Answer

i.  a - (b++) * (--c)
⇒ 2 - 3 * 2
⇒ 2 - 6
⇒ -4

ii. a * (++b) %c
⇒ 2 * 4 % 3
⇒ 8 % 3
⇒ 2

Answered By

109 Likes


Related Questions