asked 162k views
5 votes
Suppose x = 10 and y = 20. The value of the expression

((x >= 10) && (y > 20) || (x < y) ) true or false?

1 Answer

6 votes

Answer:

true

Step-by-step explanation:

The given operators && and || are Logical operators whose execution is from left to right.so first (x>=10)&&(y>20) will be executed .Given values for x and y are 10 ,20 (10>=10 true)&&(10>20 false), which gives result as false (&& evaluates to true only when both conditions are true).so the result of this is false. next condition is ||. for this (20>=10)&&(20>20) is false and (x<y)(10<20) is true, which gives result as true.(|| evaluates to true if any one is true).

The Answer is True

answered
User VCNinc
by
8.5k points