wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Topic 8 EOT Test

Total questions: 70

Worksheet time: 46mins

Name
Class
Date
1.

This allows you to use debugging tools to help find and fix errors in your code.

a)

Translator

b)

Run time environment

c)

Editor

d)

Error diagnostics

e)

Anti malware

2.

This can help you find logic errors in your code when developing your program.

a)

Translator

b)

Run time environment

c)

Editor

d)

Error diagnostics

3.

Compilers, assemblers and interpreters are examples of this.

a)

Translator

b)

Run time environment

c)

Editor

d)

Error diagnostics

4.

Translates high level code into low level code.

a)

Interpreter

b)

Compiler

c)

Assembler

d)

Error diagnostics

e)

Interpreter and complier

5.

Examples of this include Python, Scratch and Javascript

a)

High level code

b)

Low level code

c)

Assembly language

6.

Which type of code is assembly language?

a)

High level code

b)

Low level code

7.

Examples of this include binary machine code and assembly language

a)

High level code

b)

Low level code

8.

This translator is used to translate all of the source code all at once and creates one executable file

a)

Interpreter

b)

Compiler

c)

Assembler

9.

This translator is used to translate the source code one instruction at a time, but doesn't create an executable file.

a)

Interpreter

b)

Compiler

c)

Assembler

10.

Uses Mnemonics as command words (for example LDA, STA and ADD)

a)

High level code

b)

Low level code

c)

Assembly language

11.

LDA, STA and ADD are examples of

a)

Assembly language mnemonics

b)

Assembly language acronyms

12.

Has a smaller instruction set made up on mnemonics.

a)

High level code

b)

Machine code

c)

Assesmbly language

13.

This code is difficult to read, understand and modify as it is designed to be understood by the CPU.

a)

High level code

b)

Low level code

14.

This code is easy to read, understand a modify as it is designed to be understood by programmers.

a)

High level code

b)

Low level code

15.

Which of the following is NOT a feature of the editor?

a)

Auto-colour coding for strings, functions and command words.

b)

Auto complete and auto correct

c)

Auto indentation

d)

Line numbering

e)

Spell check

16.

This allows you to run your code quickly, instead of needing to compile it first.

a)

Translator

b)

Run time environment

c)

Editor

d)

Error diagnostics

17.

Breakpoints are an example of

a)

A debugging tool

b)

A run time environment tool

c)

An editing tool

18.

Which of the following will allow you to translate assembly code into machine code?

a)

Interpreter

b)

Compiler

c)

Assembler

d)

All of them

e)

Assembler and compiler

19.

Which errors can error diagnostic tools help you fix?

a)

Syntax errors

b)

Logic errors

20.

Creates an executable file

a)

Interpreter

b)

Compiler

c)

Assembler

21.

Must be installed for the code to run on another machine

a)

Interpreter

b)

Compiler

c)

Assembler

22.

The correct order of the stages of compilation is:

a)

Lexical Analysis, Syntax Analysis, Code Generation, Code Optimisation

b)

Lexical Analysis, Syntax Analysis, Code Optimisation, Code Generation

c)

Syntax Analysis, Lexical Analysis, Code Optimisation, Code Generation

d)

Syntax Analysis, Lexical Analysis, Code Generation, Code Optimisation

23.

Removing whitespace is in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

24.

Token creation is in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

25.

Symbol table is created in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

26.

The code is checked against the rules in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

27.

The syntax tree is created in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

28.

The user will first be alerted to errors found in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

29.

The syntax tree is converted into object code in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

30.

Redundant code is removed in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

31.

The code is improved to run as fast as possible in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

32.

At the linking stage...

a)

Code from the linked library is copied into the program

b)

Code from the linked library is removed from the program

33.
Give two advantages of using compiled code over interpreted code
a)
Faster to execute
b)
Does not require compiler to run
c)
Is platform independent
d)
Runs instantly without time waiting for compilation
34.
What happens during syntax analysis?
a)
Tokens are compared to the rules of the programming language
b)
Syntax errors are identified
c)
Symbol table updated with more details
d)
Semantic analysis (finding logic errors)
e)
Code generation
35.
What is the purpose of the optimisation stage of compilation?
a)
Reduce execution time
b)
Reduce inefficient sections of code
c)
Remove redundant code
d)
Tokens are compared to the rules of the programming language
e)
Syntax errors are identified
36.

Syntax errors are always spotted when the program is compiled or interpreted.

a)

True

b)

False

37.

Which of these pseudocode statements is an example of a logic error?

a)

FOR x=0 TO 10 STEP -1

b)

FOR x=0 TO 10 STEP 1

c)

FOR x=10 TO 0 STEP -1

d)

FOR x=0 TOO 10 STEP 1

38.

Syntax errors are caused by incorrectly typed source code.

a)

True

b)

False

39.

Which of these pseudocode statements contains a syntax error?

a)

pounds = pence x 100

b)

pounds = pence * 100

c)

pounds = pence / 100

d)

pounds = 100 / pence

40.

Modern IDEs are able to spot syntax errors as the programmer types.

a)

True

b)

False

41.

Which statement best describes logic errors?

a)

An error in a program that causes it to produce incorrect ouputs but not a crash.

b)

An error in a program that causes it to crash.

c)

An error in the program caused by mis-spelt instructions.

d)

An error in a program caused by hardware failure.

42.

Which of these expressions will generate a logic error when the expected output is 10?

a)

answer = 2 + 3 * 2

b)

answer = (2 + 3) * 2

c)

answer = 2 + 3 x 2

d)

answer = {2 + 3} * 2

43.

Named THREE types of error in programming

a)

syntax time errors, single time errors and logical errors

b)

Grammatical errors, single time errors, and logical errors

c)

Grammatical errors, run time errors, logical errors

d)

syntax time errors, run time errors, and logic errors

44.

Which statement best describes logic errors?

a)

An error in a program that causes it to produce incorrect ouputs but not a crash.

b)

An error in a program that causes it to crash.

c)

An error in the program caused by mis-spelt instructions.

d)

An error in a program caused by hardware failure.

45.

What is a syntax error?


a)

an error that occurs during editing the program

b)

an error that occurs during compilation

c)

an error that occurs during execution

d)

an error that occurs during input of data

46.

what is an error in a program called

a)

bug

b)

debugging

c)

syntax error

d)

runtime error

47.

Looking for faults in programs and fixing them is called debugging

a)

false

b)

true

c)

I don’t know

d)

it depends

48.

Which of this command has errors? Select multiple

a)

System.out.print("Hello World")

b)

System.out.print(Hello World);

c)

System.out.Print("Hello World);

d)

System.out.print("Hello World");

49.

Observe the above statement to identify the type of error occurred.

a)

Logic error

b)

Syntax error

c)

Run–time error

d)

Operator error

50.

A program won't run if there is a logic error.

a)

False

b)

True

51.

A ____________ occurs after a script has been successfully loaded with no syntax errors and is being executed by a browser.

a)

load-time error

b)

run-time error

c)

logical error

d)

random error

52.

Select the suitable error based on the statement below:

“A programmed produces the wrong result”.

a)

Run time error

b)

Compile time error

c)

Syntax error

d)

Logic error

53.

Identify the line with syntax error.

a)

Line 8 and Line 15

b)

Line 10 only

c)

Line 6, Line 8, Line 10

d)

Line 8, Line 11 and Line 15

54.

Which level of a programming language is Machine Code?

a)

Low

b)

High

55.

Which level of a programming language is Assembly Code?

a)

Low

b)

High

56.

Which level would create the fastest code to execute?

a)

Low

b)

Assembly

c)

High

57.

Which level would create the easiest code for humans to understand?

a)

Low

b)

Assembly

c)

High

58.

Machine Code uses mnemonics to represent instructions

a)

True

b)

False

59.

Python is an example of a High Level programming language

a)

True

b)

False

60.

An advantage of programming in Low Level is

a)

Easier for us to understand

b)

Easier to debug

c)

Programs require less file space

61.

A disadvantage of programming in Low Level is

a)

No technical skill is required

b)

Needs to be translated before it can be executed

c)

Difficult for humans to debug

62.

An advantage of programming in High Level is

a)

Easier for us to understand

b)

Useful for device drivers

c)

Programs execute faster than other generations

63.

A disadvantage of programming in High Level is

a)

A lot of code must be translated before it can be executed

b)

Difficult to debug

c)

High level of technical skill is required

64.

What sort of relationship do the instructions have between High and Low Level languages?

a)

One to One - One high level instruction is equivalent to one low level

b)

One to Many - For every hgh level instruction there are many low level ones

65.

Which generation?

a)

Machine Code - Low

b)

Assembly Code - Low

c)

High Level

66.

Which generation?

a)

Machine Code - Low

b)

Assembly Code - Low

c)

High Level

67.

Which generation?

a)

Machine Code - Low

b)

Assembly Code - Low

c)

High Level

68.

Binary is the only language a computer can understand

a)

True

b)

False

69.

Computers must translate everything into binary

a)

True

b)

False

70.

High Level Code is easier for humans to understand as it is written in English

a)

True

b)

False