2210/11/M/J/22 question 6: worked solution (May/June 2022, paper 11)

Show as plain text

Cambridge O Level Computer Science 2210 · 4.2 Types of programming language, translators and integrated development environments (IDEs) Worked solution from the Software Paper 1 Computer Systems booklet, Part 2 of 2. Q16 2210/11/M/J/22 original Q6 Structured · 5 marks Worked solution (a)(i) Write one other similarity: Both check for errors (or report errors) [1] (a)(ii) Give two differences and explain each. Say what the interpreter does and what the compiler does. Difference 1: an interpreter translates the code line by line and runs each line straight away [1] ... whereas a compiler translates the whole code at the same time, before it is run [1] Difference 2: an interpreter stops and reports an error as it meets it, and runs the code up to that point [1] ... whereas a compiler makes an error report at the end and will not run the code if there is an error [1] Other accepted differences: a compiler produces an executable file but an interpreter does not; an interpreter is needed every time the program runs, but a compiler is not. KEY IDEA Compare both translators point by point: line by line against the whole program, and errors reported at once against at the end. TOTAL 5 marks Official mark scheme VIDEO ▶ Starts at Q6 (8:50) Starts at Q6 (8:50) · by Ace Academy. Tap the picture to open it on YouTube.