Chapter 7 Program Bugs Are Typically

subject Type Homework Help
subject Pages 4
subject Words 672
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Chapter 7: What’s Wrong With It? (Syntax, Logic, and Run Time Errors)
TRUE/FALSE
1. You can only use variable memory locations to control the data type of numbers used in calculations.
2. Both constant and variable memory locations make your code more self-documenting and easier to
understand.
3. You can use variables to store the values of processing items, which do not appear in a user interface.
4. One advantage of variables and named constants is that their use requires fewer lines of code.
5. As the amount of code increases, so does the likelihood for errors.
6. Program bugs typically are caused by either syntax errors or logic errors.
7. Logic errors are the easiest to find.
8. The Code Editor detects most syntax errors as you enter the instructions.
9. The Error List window displays a red rectangle next to each error in the code.
10. Unlike logic errors, syntax errors are much more difficult to find because they do not trigger an error
message from the Code Editor.
11. Some logic errors occur as a result of calculation statements that are correct syntactically, but incorrect
mathematically.
page-pf2
12. When debugging, while the execution of a procedure’s code is paused, you can view the contents of
controls and variables that appear in the highlighted statement, as well as in the statements above it in
the procedure.
13. The letter D indicates that the data type of the variable’s value is Decimal.
14. Stepping through code one line at a time is the only way to search for logic errors.
15. A run time error is an error that occurs while an application is running.
MULTIPLE CHOICE
1. An error in a program’s code is referred to as a ____.
a.
feature
c.
mental exercise
b.
function
d.
bug
2. The process of locating and correcting any bugs in a program is called ____.
a.
exterminating
c.
compiling
b.
debugging
d.
linking
3. Program bugs are typically categorized as syntax errors, logic errors, or ____ errors.
a.
debug
c.
compiler
b.
run time
d.
program
4. The set of rules you must follow when using a programming language is called the language’s ____.
a.
syntax
c.
order
b.
rules
d.
object
5. A ____ error occurs when you break one of the language’s rules.
a.
compiler
c.
syntax
b.
linking
d.
logic
6. Most syntax errors are a result of ____ errors that occur when entering instructions.
a.
typing
c.
computer
b.
automatic
d.
system
page-pf3
7. In the Code Editor window, the ____ alert you that three lines of code contain a syntax error.
a.
jagged red lines
c.
thick red boxes
b.
thin blue boxes
d.
jagged blue lines
8. The ____ window provides a description of each error and the location of each error in the code.
a.
Code
c.
Project
b.
Error List
d.
Solution
9. In the Error List window, ____ indicate that the Code Editor has some suggestions for fixing the
errors.
a.
red jagged lines
c.
red rectangles
b.
blue jagged lines
d.
blue triangles
10. A ____ error can occur for a variety of reasons, such as forgetting to enter an instruction or entering
the instructions in the wrong order.
a.
syntax
c.
computer
b.
function
d.
logic
11. Entering instructions in the wrong order in a program can cause a ____ error.
a.
logic
c.
function
b.
sequential
d.
composition
12. When debugging, to execute the highlighted instruction, you can use either the Debug menu’s Step
Into option or the ____ key on your keyboard.
a.
F2
c.
F8
b.
F6
d.
F12
13. While stepping through a program in the debugger, the ____ statements are skipped over because they
are not considered executable by the debugger.
a.
If
c.
For
b.
Next
d.
Dim
14. You can use a ____ to pause execution at a specific line in the code.
a.
comment
c.
function header
b.
breakpoint
d.
wait
15. An expression that attempts to divide a value by the number 0 will result in a ____ error.
a.
syntax
c.
run time
b.
logic
d.
sequence
page-pf4

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.