Computer Science, asked by elpixaxa, 1 month ago

What will be the output for the following! (1) 20>55||55>20​

Answers

Answered by anindyaadhikari13
2

ANSWER.

  • true.

EXPLANATION.

We have to evaluate the given expression.

Now,

20 > 55

= false

Again,

55 > 20

= true.

So,

20 > 55 || 55 > 20

= false || true

Since, one condition is true, the result is true,

= true.

LEARN MORE.

Logical Operators -

→ Used to perform logical operations. These operators yield true/false depending.

There are three logical operators –

  1. Logical AND (Symbol - &&) - Returns true if all the conditions are true else false.
  2. Logical OR (Symbol - ||) - Returns true if any of the conditions is true. If all the conditions are false, it returns false.
  3. Logical NOT (Symbol - !) - It is used to negate the result of the conditional expression. Example, !true = false.
Answered by purveshKolhe
3

 \huge{ \green{ \boxed{ \red{  \mathfrak{answer : }}}}}

Answer is as follows::

==> '||' means or, therefore, even if one value is true, it will output as True.

==> '&&' is used as and, so, if both the values are true, then only it outputs True, else, it will output False.

Your statement::

20 > 55 || 55 > 20

Output::

It will output True as one of the value is true.

 \boxed{hope \: this \: helps \: you}

Similar questions