Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1CALL ShowMenu() | APROCEDURE Start() CALL ShowMenu() OUTPUT "Done" ENDPROCEDURE | |
| 2ENDPROCEDURE | BControl passes to ShowMenu, which runs its statements in order, then control returns to the next line | |
| 3One procedure can call another, and control returns to the first procedure when the second one ends | CThe statement after the call does not run first. Control passes into ShowMenu, and the next line runs only after ShowMenu ends. | |
| 4After a subroutine ends, the program continues with the line that follows the call | DCALL ShowMenu() OUTPUT "Menu closed" | |
| 5CALL ShowMenu() OUTPUT "Menu closed" // Output order: Menu closed, then the menu lines | EThe last line of the procedure: control returns to the line after the CALL | |
| 6// After ENDPROCEDURE, the program stops CALL ShowMenu() OUTPUT "Menu closed" | FThe program does not stop at ENDPROCEDURE. Control returns to the line after the CALL and the program carries on. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
CALL ShowMenu() — Control passes to the subroutine, which runs its statements in order. After its last statement, control returns to the line that follows the call.CALL ShowMenu()
OUTPUT "Done"PROCEDURE ShowMenu()
OUTPUT "Menu"
ENDPROCEDUREPROCEDURE Start()
CALL Setup()
ENDPROCEDUREOUTPUT "Start"
CALL Show()
OUTPUT "End"PROCEDURE ShowMenu()
OUTPUT "Menu"
ENDPROCEDURE