Develop code Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Give three types of errors that could occur within a program.

A
  • Syntax
  • Logic
  • Runtime
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a syntax error?

A

An error that occurs when the rules of the programming language are not followed (e.g. command word is mispelled, punctuation is incorrect, variable is used without being initialised)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a logic error?

A

An error that occurs when there is a flaw in the design of a program, which does not prevent it from running but produces an incorrect or unexpected result

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a runtime error?

A

An error that occurs during program execution when the processor is asked to perform an impossible operation (e.g. divide by zero, open a non-existent file)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

State the purpose of a trace table.

A
  • To allow the value of a variable, outputs and decisions in certain points throughout the algorithm to be recorded
  • To help detect logic errors in the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly