Chapter 3: testing conditionals. Question 7 of 9


Conditionals
1 Instruction
2 Instruction
3 IF Test 111 THEN
4      Instruction
5 ELSE
6      IF Test 222 THEN
7      |     Instruction
8      ELSE
9      |     Instruction
10      END IF
11 END IF
12 End of the program

In the program shown opposite, the line marked with an arrow will be executed.

After execution, which line will the program jump to?

Click on the button corresponding to the line the program will jump to after execution of the line marked with an arrow. Then click on "Check my answer".

The ELSE in line 8 belongs to the IF in line 6.

If the program arrives at line 8, it was executing the THEN instructions of line 6.

The ELSE signals the end of this THEN; the program must therefore jump to the line following the corresponding END IF, i.e. line 11.

Next question

Stop the test