Multiple choice technology programming languages

What's wrong? while( (i < 10) && (i > 24))

  1. the logical operator && cannot be used in a test condition

  2. the while loop is an exit-condition loop

  3. the test condition is always false

  4. the test condition is always true

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

A number cannot be simultaneously less than 10 and greater than 24. Since both conditions must be true for the logical AND (&&) to evaluate to true, the test condition is always false. The other options are incorrect because && is valid in loops, while is an entry-condition loop, and the statement cannot be true.