Writing error-free code test questions

1

What is a bug?

2

What is a syntax error?

3

What is a logic error?

4

If a syntax error is present, what will happen when the error is encountered?

5

If a logic error is present, what will happen when the error is encountered?

6

Which of the following contains a syntax error?

7

How can the legibility of code be improved?

8

What is a comment?

9

Why are comments included in code?

10

Which of the following is a meaningful variable name?