Electronics and Communication Engineering - Microprocessors - Discussion

Discussion Forum : Microprocessors - Section 1 (Q.No. 47)
47.
Let JCOKE = 98 and LPEPSI = 42 Consider the statement

IF (JCOKE - 3 * LPEPSI) 5, 6, 7
5 JCOKE = JCOKE + 5
6 JCOKE = JCOKE + 8
7 JCOKE = JCOKE + 11

The value of JCOKE after the execution of above statement will be
103
106
109
none of the above
Answer: Option
Explanation:

Since (J COKE - 3 x L PEPSI) is negative, statement 5 is executed and the result is 98 + 5 = 103.

Discussion:
13 comments Page 2 of 2.

Bhavana said:   1 decade ago
JCOKE - (3*L PEPSI) check the operators priority.

Amrata Kamat said:   1 decade ago
I didn't understood how it is negative?

Priyal patle said:   1 decade ago
I can not understand the answer please show me the logic behind it.


Post your comments here:

Your comments will be displayed after verification.