Microprocessors - Engineering

Q1:

Let JCOKE = 20 and LPEPSI =15. Consider the statement

IF(2* JCOKE. LE. LPEPSI)
JCOKE = JCOKE + 5
JCOKE = JCOKE + 3

The value of JCOKE after the execution of above statement will be

A 25

B 23

C 15

D 17

ANS:B - 23

Since 2 x J COKE = 40 and (LPEPSI) is 15 control goes to statement J COKE = J COKE + 3 and result is 23.