Errors and Corrections Flashcards

1
Q

What is debugging?

A

The process of spotting and correcting mistakes

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

What is a logic error?

A

When code doesn’t make sense (e.g. My pencil just rode a bike to London)

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

Why can logic errors only be spotted by the programmer?

A

The computer will just do exactly as it has been told

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

What is a syntax error caused by?

A

Caused by using incorrect grammar for that particular language

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

What are 7 common examples of syntax errors?

A
Missing end of line marker
Missing bracket
Missing end of string marker
No return statement in a procedure
Incompatible data type
Using = when == should have been used
Not closing WHILE and FOR loops properly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are 5 debugging methods?

A
Comments
Debugging outputs
Break points
Single-stepping
Test code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a run time error?

A

Run time errors only show up as the program is actually running

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

What are 3 common examples of run time errors?

A

Overflow error
Stack Overflow error
Calling an absent library procedure

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

When is an overflow error caused?

A

When a value is too big to be stored in the memory the program has assigned to hold it

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

When is a stack overflow error caused?

A

If a program tries calling too many functions at once, the stack (a temporary store) will get too full and the program won’t know where to return to

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