asked 6.2k views
1 vote
Identify the false statement.

a. When you use an && or || operator, each Boolean expression that surrounds the operator is always tested in order from left to right.
b. The AND operator is written as two ampersands ( && ), and the OR operator is written as two pipes ( || ).
c. When you use the && and || operators, you must include a complete Boolean expression on each side.

PLEASE HELP

1 Answer

2 votes
a is false.
the second operand is not always evaluated
if the first operand is true in the OR (||) then the second is not evaluated
if the first operand in an AND (&&) is false then the second is not evaluated
that is called short circuit evaluation.
c is also false the expressions do not have to be boolean any numeric value is also allowed. It just to be zero or non zero

answered
User Elver Loho
by
8.8k points