Types Of Errors Flashcards

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

Syntax error

A

An error that occurs when a command does not follow the expected syntax of the language, e.g. when a keyword is incorrectly spelt.

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

Runtime/execution error

A

An error that causes a program to output an incorrect answer (that does not necessarily crash the program).

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

Linking error

A

An error that occurs when a programmer calls a function within a program and the correct library has not been linked to that program.

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

Rounding error

A

Rounding is when a number is approximated to nearest whole number/tenth/hundredth, etc.

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

Truncation error

A

Truncating is when a number is approximated to a whole number/tenth/hundredth, etc. nearer zero.

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

An example of a syntax error

A

Incorrect: IF A ADN B Then
Correct: IF A AND B Then

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

An example of a runtime error

A

Program requests more memory when none is available, so the program crashes.

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

An example of a logical error

A

An algorithm that calculates a person’s age from their date of birth, but ends up giving negative numbers.

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

An example of a linking error

A

When the square root function is used and the library that calculates the square root has not been linked to the program.

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

An example of a rounding error

A

34.5 rounded to nearest whole number is 35, an error of +0.5.

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

An example of a truncation error

A

34.9 truncated to whole number is 34, an error of –0.9.

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

Logical errors

A

An error that causes a program to output an incorrect answer (that does not necessarily crash the program).

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