Exam code: 9618
1/450Still learning
Know0
Define translator.
A translator is a program that translates program source code into machine code so that it can be executed directly by a processor.

Join for free to unlock a full flashcard set, track what you know,
and turn revision into real progress.
Which type of translator is used for a low-level language such as assembly code?
An assembler translates low-level assembly code into machine code.
An assembler translates written in assembly language into machine code.
An assembler translates mnemonics written in assembly language into machine code.
Was this flashcard helpful?
Define translator.
A translator is a program that translates program source code into machine code so that it can be executed directly by a processor.
Which type of translator is used for a low-level language such as assembly code?
An assembler translates low-level assembly code into machine code.
An assembler translates written in assembly language into machine code.
An assembler translates mnemonics written in assembly language into machine code.
How much machine code does an assembler produce for each line of assembly language?
Each line of assembly language is assembled into a single machine code instruction.
Define compiler.
A compiler translates a high-level language into machine code all in one go.
Define interpreter.
An interpreter translates a high-level language into machine code one line at a time.
At which stage of development is a compiler normally used?
A compiler is generally used when a program is finished and has been checked for syntax errors.
At which stage of development is an interpreter normally used?
An interpreter is generally used when a program is being written, in the development stage.
True or False?
An interpreter generates machine code directly.
False.
An interpreter does not generate machine code directly; appropriate machine code subroutines are called instead.
What happens when an interpreter finds an error?
Each line is executed after translation, and if any errors are found the process stops.
Give one disadvantage of using an assembler.
Assembly code is difficult to write because the commands are limited and hard to understand, any change means it must be reassembled, and it is designed solely for one specific processor.
Which runs faster, a compiled program or an interpreted program?
A compiled program runs faster, because translation is done in advance and optimised machine code is used.
What software does an end user need to run a compiled program?
An end user needs only the executable file, not the compiler, so there is no extra cost or setup.
Why can a user not modify a compiled program?
Users do not receive the source code, so they cannot modify or extend the program.
Interpreted programs must be interpreted on the same type of machine, so they are less .
Interpreted programs must be interpreted on the same type of machine, so they are less portable.
Why is an interpreter easier to debug with than a compiler?
Errors are caught one line at a time and the developer can view partial results as they go, making it easier to test and refine the program.
True or False?
A compiled program will still run if it contains syntax errors.
False.
A compiled program does not run until all syntax and semantic errors have been fixed.
Why is it harder for a developer to monetise an interpreted program?
The developer loses control over the code, which makes it harder to charge for upgrades or prevent copying.
Define mixed mode translation.
Mixed mode translation combines features of both a compiler and an interpreter, compiling the program into an intermediate form that is then interpreted at runtime.
What is source code compiled into in mixed mode translation?
The source code is compiled into intermediate code, such as bytecode, rather than full machine code.
What interprets the intermediate code in mixed mode translation?
The intermediate code is interpreted by a virtual machine, for example the Java Virtual Machine (JVM).
What does just-in-time (JIT) compilation do?
Just-in-time compilation converts some parts of the intermediate code into machine code at runtime, which improves performance.
True or False?
A mixed mode program executes faster than a fully compiled program.
False.
A fully compiled program is fastest. Mixed mode translation gives medium speed, although JIT compilation makes it faster over time.
Give one advantage of mixed mode translation over a compiler.
Mixed mode translation is highly portable across platforms, whereas fully compiled code is not portable.
Define integrated development environment (IDE).
An integrated development environment is a software tool that gives programmers an integrated platform to write, edit, compile, debug and manage their code.
True or False?
An IDE must always be downloaded and installed as an app.
False.
An IDE can be an app to download or it can be web-based.
What does syntax highlighting do?
Syntax highlighting visually distinguishes different elements of code, assigning distinct colours or styles to keywords, strings, comments, variables and functions.
How does syntax highlighting help a programmer?
It helps programmers quickly identify and differentiate code components, which reduces the chance of syntax errors and improves code comprehension.
Syntax highlighting is also known as printing.
Syntax highlighting is also known as pretty printing.
What does autocomplete do?
Autocomplete suggests code completions as the programmer types, for example listing the available variable, function or method names.
Give one way autocomplete improves productivity.
Autocomplete reduces typing effort and prevents typing errors and naming inconsistencies.
What does auto indent do?
Auto indent automatically indents the programming code when a new line is started within a code block.
In which programming constructs is auto indent commonly used?
Auto indent is commonly used in selection and iteration constructs.
Define code comment.
A code comment is a line of text within the code that is not executed, but which documents and explains the code for programmers.
What does syntax error highlighting do?
Syntax error highlighting automatically highlights syntax errors in the code editor as the programmer types, even before the code is executed.
Define variable watch window.
A variable watch window is a debugging tool that allows developers to monitor the values of specific variables during runtime.
Define breakpoint.
A breakpoint is a marker set at a specific line of code to halt program execution during runtime.
What can a developer do when a program pauses at a breakpoint?
The developer can inspect the program's state and variable values to identify the cause of potential bugs.
What does the error message list display?
The error message list displays a collection of errors, warnings and messages generated during the compilation and execution of the program.
Define stepping mode.
Stepping mode is a debugging mode that allows developers to execute the program one line at a time.
Name the three step options available in stepping mode.
The three step options are step into, step over and step out.
True or False?
A breakpoint and stepping mode do the same thing.
False.
A breakpoint halts execution at one chosen line, whereas stepping mode executes the program one line at a time.
What does a crash dump or post-mortem report capture?
It captures the program's state and memory contents at the time of the crash, helping developers diagnose the root cause after the program has terminated unexpectedly.
What does the stack contents tool show?
It shows the order in which functions were called, along with the parameters and local variables of each function.
Breakpoints, stepping mode and the variable watch window are all tools provided by an IDE.
Breakpoints, stepping mode and the variable watch window are all debugging tools provided by an IDE.
By signing up you agree to our Terms and Privacy Policy