Multiple choice

If X = 7, what happens when the following statement is executed? IF (X + 3) + 5 > 10 THEN PRINT "Answer is correct." END IF

  1. The first executable statement after this statement is executed.

  2.  Answer is correct. is printed.

  3. The program stops executing.

  4. An error message is displayed.

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

When X=7, the expression (X+3)+5 = (7+3)+5 = 15. Since 15 > 10 is true, the THEN clause executes and prints 'Answer is correct.' The program doesn't stop or error; it simply executes the PRINT statement.