Multiple choice

What happens if the variable A is equal to 30 when QBasic executes the following statement? IF A = 32 THEN A = A * 2 END IF

  1. The ELSE clause will be executed.

  2. Control will be passed to the statement following this one.

  3. The value of A will be doubled.

  4. An error will occur and program execution stop.

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

When A=30, the condition (A = 32) evaluates to false, so the code inside the IF block is skipped. Control simply passes to the next statement after END IF. No ELSE clause exists, and no error occurs.