Electronics and Communication Engineering - Microprocessors - Discussion

Discussion Forum : Microprocessors - Section 3 (Q.No. 40)
40.
LET JCOKE = 11 and LPEPSI = 19. Consider the statement

IF (JCOKE - LPEPSI) 5, 5, 7
5 JCOKE = JCOKE + 2
7 JCOKE = JCOKE + 5

The value of JCOKE after the execution of above statement will be
13
16
9
14
Answer: Option
Explanation:

(J COKE - L PEPSI) is 11 - 19 = - 8 Since (J COKE - L PEPSI) is negative statement 5 is executed and result is 11 + 2 = 13.

Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.