Font size
WorksheetsTopic 8 EOT Test
Total questions: 70
Worksheet time: 46mins
This allows you to use debugging tools to help find and fix errors in your code.
Translator
Run time environment
Editor
Error diagnostics
Anti malware
This can help you find logic errors in your code when developing your program.
Translator
Run time environment
Editor
Error diagnostics
Compilers, assemblers and interpreters are examples of this.
Translator
Run time environment
Editor
Error diagnostics
Translates high level code into low level code.
Interpreter
Compiler
Assembler
Error diagnostics
Interpreter and complier
Examples of this include Python, Scratch and Javascript
High level code
Low level code
Assembly language
Which type of code is assembly language?
High level code
Low level code
Examples of this include binary machine code and assembly language
High level code
Low level code
This translator is used to translate all of the source code all at once and creates one executable file
Interpreter
Compiler
Assembler
This translator is used to translate the source code one instruction at a time, but doesn't create an executable file.
Interpreter
Compiler
Assembler
Uses Mnemonics as command words (for example LDA, STA and ADD)
High level code
Low level code
Assembly language
LDA, STA and ADD are examples of
Assembly language mnemonics
Assembly language acronyms
Has a smaller instruction set made up on mnemonics.
High level code
Machine code
Assesmbly language
This code is difficult to read, understand and modify as it is designed to be understood by the CPU.
High level code
Low level code
This code is easy to read, understand a modify as it is designed to be understood by programmers.
High level code
Low level code
Which of the following is NOT a feature of the editor?
Auto-colour coding for strings, functions and command words.
Auto complete and auto correct
Auto indentation
Line numbering
Spell check
This allows you to run your code quickly, instead of needing to compile it first.
Translator
Run time environment
Editor
Error diagnostics
Breakpoints are an example of
A debugging tool
A run time environment tool
An editing tool
Which of the following will allow you to translate assembly code into machine code?
Interpreter
Compiler
Assembler
All of them
Assembler and compiler
Which errors can error diagnostic tools help you fix?
Syntax errors
Logic errors
Creates an executable file
Interpreter
Compiler
Assembler
Must be installed for the code to run on another machine
Interpreter
Compiler
Assembler
The correct order of the stages of compilation is:
Lexical Analysis, Syntax Analysis, Code Generation, Code Optimisation
Lexical Analysis, Syntax Analysis, Code Optimisation, Code Generation
Syntax Analysis, Lexical Analysis, Code Optimisation, Code Generation
Syntax Analysis, Lexical Analysis, Code Generation, Code Optimisation
Removing whitespace is in:
Lexical Analysis
Syntax Analysis
Code Generation
Code Optimisation
Token creation is in:
Lexical Analysis
Syntax Analysis
Code Generation
Code Optimisation
Symbol table is created in:
Lexical Analysis
Syntax Analysis
Code Generation
Code Optimisation
The code is checked against the rules in:
Lexical Analysis
Syntax Analysis
Code Generation
Code Optimisation
The syntax tree is created in:
Lexical Analysis
Syntax Analysis
Code Generation
Code Optimisation
The user will first be alerted to errors found in:
Lexical Analysis
Syntax Analysis
Code Generation
Code Optimisation
The syntax tree is converted into object code in:
Lexical Analysis
Syntax Analysis
Code Generation
Code Optimisation
Redundant code is removed in:
Lexical Analysis
Syntax Analysis
Code Generation
Code Optimisation
The code is improved to run as fast as possible in:
Lexical Analysis
Syntax Analysis
Code Generation
Code Optimisation
At the linking stage...
Code from the linked library is copied into the program
Code from the linked library is removed from the program
Syntax errors are always spotted when the program is compiled or interpreted.
True
False
Which of these pseudocode statements is an example of a logic error?
FOR x=0 TO 10 STEP -1
FOR x=0 TO 10 STEP 1
FOR x=10 TO 0 STEP -1
FOR x=0 TOO 10 STEP 1
Syntax errors are caused by incorrectly typed source code.
True
False
Which of these pseudocode statements contains a syntax error?
pounds = pence x 100
pounds = pence * 100
pounds = pence / 100
pounds = 100 / pence
Modern IDEs are able to spot syntax errors as the programmer types.
True
False
Which statement best describes logic errors?
An error in a program that causes it to produce incorrect ouputs but not a crash.
An error in a program that causes it to crash.
An error in the program caused by mis-spelt instructions.
An error in a program caused by hardware failure.
Which of these expressions will generate a logic error when the expected output is 10?
answer = 2 + 3 * 2
answer = (2 + 3) * 2
answer = 2 + 3 x 2
answer = {2 + 3} * 2
Named THREE types of error in programming
syntax time errors, single time errors and logical errors
Grammatical errors, single time errors, and logical errors
Grammatical errors, run time errors, logical errors
syntax time errors, run time errors, and logic errors
Which statement best describes logic errors?
An error in a program that causes it to produce incorrect ouputs but not a crash.
An error in a program that causes it to crash.
An error in the program caused by mis-spelt instructions.
An error in a program caused by hardware failure.
What is a syntax error?
an error that occurs during editing the program
an error that occurs during compilation
an error that occurs during execution
an error that occurs during input of data
what is an error in a program called
bug
debugging
syntax error
runtime error
Looking for faults in programs and fixing them is called debugging
false
true
I don’t know
it depends
Which of this command has errors? Select multiple
System.out.print("Hello World")
System.out.print(Hello World);
System.out.Print("Hello World);
System.out.print("Hello World");
Observe the above statement to identify the type of error occurred.
Logic error
Syntax error
Run–time error
Operator error
A program won't run if there is a logic error.
False
True
A ____________ occurs after a script has been successfully loaded with no syntax errors and is being executed by a browser.
load-time error
run-time error
logical error
random error
Select the suitable error based on the statement below:
“A programmed produces the wrong result”.
Run time error
Compile time error
Syntax error
Logic error
Identify the line with syntax error.
Line 8 and Line 15
Line 10 only
Line 6, Line 8, Line 10
Line 8, Line 11 and Line 15
Which level of a programming language is Machine Code?
Low
High
Which level of a programming language is Assembly Code?
Low
High
Which level would create the fastest code to execute?
Low
Assembly
High
Which level would create the easiest code for humans to understand?
Low
Assembly
High
Machine Code uses mnemonics to represent instructions
True
False
Python is an example of a High Level programming language
True
False
An advantage of programming in Low Level is
Easier for us to understand
Easier to debug
Programs require less file space
A disadvantage of programming in Low Level is
No technical skill is required
Needs to be translated before it can be executed
Difficult for humans to debug
An advantage of programming in High Level is
Easier for us to understand
Useful for device drivers
Programs execute faster than other generations
A disadvantage of programming in High Level is
A lot of code must be translated before it can be executed
Difficult to debug
High level of technical skill is required
What sort of relationship do the instructions have between High and Low Level languages?
One to One - One high level instruction is equivalent to one low level
One to Many - For every hgh level instruction there are many low level ones
Which generation?
Machine Code - Low
Assembly Code - Low
High Level
Which generation?
Machine Code - Low
Assembly Code - Low
High Level
Which generation?
Machine Code - Low
Assembly Code - Low
High Level
Binary is the only language a computer can understand
True
False
Computers must translate everything into binary
True
False
High Level Code is easier for humans to understand as it is written in English
True
False
