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 | |
|---|---|---|
| 1compile(whole_program) -> 3 errors, no executable | AA compiler does not run any part of the program if there are errors. It translates the whole program first, and nothing runs until all errors are removed. | |
| 2change 1 line -> recompile everything -> run | BIF errors_found THEN no_executable ELSE run | |
| 3Errors must be cleared before any part of the program will run | CTesting even a small change is slow because the whole program has to be translated again before it can be tried | |
| 4An executable is machine dependent and only works on one type of machine | DThe executable is machine dependent. It only works on the type of machine it was compiled for, so it must be recompiled for each different machine type. | |
| 5Line 5 is correct, so a compiler will run lines 1 to 5 and stop at the error on line 6 | EThe compiler stops and produces no executable, so no part of the program can run until every error is fixed | |
| 6Compiled once on a PC, so the same executable will run on any phone, tablet or Mac | Fprog_windows.exe on Mac -> fails to run |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
compiler disadvantages — A compiler must translate the whole program without errors before any of it runs, and its executable only works on one machine type, so testing small changes is slow.compiled ← compile(sourceCode)IF errorCount > 0 THEN
OUTPUT "Fix errors first"
ENDIFIF machineType = targetType THEN
run(executable)
ENDIFedit(line5)
compile(program)
run(program)IF errorCount = 0 THEN
run(executable)
ENDIF