Name:     ID: 
 
Email: 

COSC 2328 Ch 8 and 9 Quiz

True/False
Indicate whether the statement is true or 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 Code Editor makes logic errors easy to find and correct.
 

 10. 

Some logic errors occur as a result of calculation statements that are correct syntactically, but incorrect mathematically.
 

 11. 

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.
 

 12. 

Stepping through code one line at a time is the only way to search for logic errors.
 

 13. 

Many times the next instruction processed depends on the result of a decision that must be made.
 

 14. 

A programmer determines whether a problem’s solution requires a selection structure by studying the problem specification.
 

 15. 

Items in square brackets are required in the syntax of an algorithm.
 

 16. 

Arithmetic operators are evaluated after any comparison operators in an expression.
 

 17. 

The oval in a flowchart is called the selection/repetition symbol.
 

 18. 

The two flowlines leading out of a diamond should be marked so that anyone reading the flowchart can distinguish the true path from the false path.
 

 19. 

You can select a check box by double-clicking it.
 

 20. 

When a check box is selected, clicking it again deselects it.
 

 21. 

Unlike the variables declared at the beginning of a procedure, variables declared within a statement block in a selection structure remain in memory until the procedure ends.
 

 22. 

Unlike variables declared at the beginning of a procedure, variables declared within a statement block have block scope rather than procedure scope.
 

 23. 

Although there is nothing wrong with declaring all variables at the beginning of a procedure, many programmers would prefer to create a variable only if it is necessary to do so.
 

 24. 

More unintentional errors occur in applications when the variables are declared using the minimum scope needed.
 

Multiple Choice
Identify the choice that best completes the statement or answers the question.
 

 25. 

An error in a program’s code is referred to as a ____.
a.
feature
c.
mental exercise
b.
function
d.
bug
 

 26. 

The process of locating and correcting any bugs in a program is called ____.
a.
exterminating
c.
compiling
b.
debugging
d.
linking
 

 27. 

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
 

 28. 

A ____ error occurs when you break one of the language’s rules.
a.
compiler
c.
syntax
b.
linking
d.
logic
 

 29. 

Most syntax errors are a result of ____ errors that occur when entering instructions.
a.
typing
c.
computer
b.
automatic
d.
system
 

 30. 

In the Code Editor window, the ____ alert you about the lines of code that contain a syntax error.
a.
thick blue boxes
c.
thick red boxes
b.
thin blue boxes
d.
thin red boxes
 

 31. 

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
 

 32. 

In the Error List window, a(n) ____ icon appears along with a down arrow when you hover your mouse pointer over the thin red box that appears below the error.
a.
Problem
c.
Error
b.
Suggestion
d.
Mistake
 

 33. 

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
 

 34. 

A ____ error may occur in a program from entering instructions in the wrong order.
a.
logic
c.
function
b.
sequential
d.
composition
 

 35. 

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
 

 36. 

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
 

 37. 

You can use a ____ to pause execution at a specific line in the code.
a.
comment
c.
function header
b.
breakpoint
d.
wait
 

 38. 

The ____ structure makes a decision and then takes an appropriate action based on that decision.
a.
loop
c.
selection
b.
condition
d.
case
 

 39. 

In the If…Then…Else statement, the programmer must supply the ____ that the computer needs to evaluate before further processing can occur.
a.
condition
c.
order
b.
execution
d.
path
 

 40. 

In the If…Then…Else statement, the condition must be a(n) ____ expression.
a.
arithmetic
c.
constant
b.
conditional
d.
Boolean
 

 41. 

Operators are called ____ operators because they are used to compare values.
a.
test
c.
change
b.
comparison
d.
binary
 

 42. 

The set of statements contained in the true path, as well as the set of statements contained in the false path, is referred to as a(n) ____.
a.
statement block
c.
executable code block
b.
conditional block
d.
path block
 

 43. 

The ____ in a flowchart is the start/stop symbol.
a.
parallelogram
c.
diamond
b.
rectangle
d.
oval
 

 44. 

The ____ in a flowchart is the process symbol.
a.
parallelogram
c.
diamond
b.
rectangle
d.
oval
 

 45. 

The ____ in a clowchart is the input/output symbol.
a.
parallelogram
c.
diamond
b.
rectangle
d.
oval
 

 46. 

The Text property of a check box should be entered using ____.
a.
all lowercase letters
c.
sentence capitalization
b.
all uppercase letters
d.
book capitalization
 

 47. 

In the flowchart a(n) ____ represents the condition in a selection structure.
a.
parallelogram
c.
diamond
b.
rectangle
d.
oval
 

 48. 

A variable that has ____ scope can be used anywhere within the procedure.
a.
mobile
c.
internal
b.
procedure
d.
block
 

 49. 

A variable that has ____ scope can be used only within the statement block in which it is declared.
a.
mobile
c.
internal
b.
procedure
d.
block
 

 50. 

A variable declared within a statement block is called a ____.
a.
block variable
c.
contained variable
b.
restricted variable
d.
simple variable
 



 
         Start Over