Menu

Translators

Card 1 of 20 0 got it 0 still learning
Question
TapClick or press space to see the answer
Answer
Translators exam questions18 questions with mark schemes and example answers
All 20 cards in this set
What is the name for a program that converts a whole high-level program into machine instructions before it is run, saving the translated output to a storage drive?
Compiler
Which term describes the translated output of a high-level program that can be saved to a storage drive and run whenever it is required?
Object code
What is meant by 'interpreter'?
A translator that converts and runs one line of a program at a time
What is meant by 'machine code'?
The binary instructions that are executed directly by the processor
What is meant by 'bytecode'?
An intermediate form of a program that can be interpreted on many different types of processor
A compiler and an interpreter both carry out which job?
Translating high-level code into machine code
What name is given to the high-level code that a programmer writes?
Source code
What does a compiler produce when it translates a program written in a high-level language?
Object code, which can be saved and run later
A program run with an interpreter produces two lines of output before stopping with an error on line 3. What does this show?
The interpreter translates and executes each line in turn
Why does a compiled program usually execute faster than an interpreted one?
It is already machine code and needs no translating
A customer buys commercial software that was supplied as object code. Why can they not adapt the program?
They only have machine code, which cannot easily be changed
A program will be supplied as interpreted source code. What must each customer have in order to run it?
An interpreter installed on their computer
A games company wants to sell its software without customers being able to see or change the code. Which approach should it use, and why?
Compile it, so that only object code is supplied
Why can an interpreted program usually be run on many different types of computer?
Any computer with the correct interpreter can run the source code
A program is run with an interpreter. The interpreter reaches a line containing a syntax error. What happens?
It stops and displays an error message
A customer is given a program that has already been compiled. What must be installed on their computer for the program to run?
Nothing, it is already machine code
A web page contains some JavaScript. How is this code run when the page is opened in a browser?
The source code in the page is interpreted by the browser
A company supplies a program as interpreted source code. What can customers do with it that they could not do with a compiled program?
Read and adapt the source code
A programmer is writing a new program and wants to test each line as soon as it is written. Which translator is more suitable?
An interpreter, because it runs each line as it is translated
A programmer runs a program with an interpreter, then looks for a file of the translated program that can be run later. What will they find?
No file, because an interpreter produces no object code