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 1 of 2.

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

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

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

Goldy said:   1 decade ago
Please explain in details. Thank you in advance.

Krisha said:   1 decade ago
98 - (3*42) = 98 - 126 = -28 according to operator priority. But what is the logic behind 103.

Swathipriya said:   10 years ago
Normally we will have only 2 cases for IF. Here are options. One is for negative what about remaining two?

Kali said:   8 years ago
I am not able to understand. What is the logic behind this?

Please explain.

Puja said:   7 years ago
Please, anyone, explain the answer with the logic.

Anju said:   5 years ago
Please explain in detail.

Jeshnavi said:   4 years ago
But why 5 should be executed. Why not 8 & 11 are executed. Can any explain this?


Post your comments here:

Your comments will be displayed after verification.