Deck 6: Loop Structures
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/107
Play
Full screen (f)
Deck 6: Loop Structures
1
A(n) ____ operator allows you to perform arithmetic operations with a variable and store the results back to that variable.
A) logical
B) rational
C) compressed
D) compound
A) logical
B) rational
C) compressed
D) compound
D
2
A(n) ____ variable collects a total value over a period of time.
A) catalog
B) glossary
C) register
D) accumulator
A) catalog
B) glossary
C) register
D) accumulator
D
3
To remove all objects from a ListBox object, the ____ method is used.
A) Clear
B) Items.Clear
C) Empty
D) Items.Empty
A) Clear
B) Items.Clear
C) Empty
D) Items.Empty
B
4
The ____ character is used to indicate that a letter is a hot key on a menu item.
A) ampersand (&)
B) forward slash (/)
C) back slash (\)
D) underscore (_)
A) ampersand (&)
B) forward slash (/)
C) back slash (\)
D) underscore (_)
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
5
A(n) ____ key is a keyboard shortcut for opening a menu.
A) hot
B) spot
C) legend
D) index
A) hot
B) spot
C) legend
D) index
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
6
A(n) ____ variable keeps track of how many times a loop has executed.
A) counter
B) accumulator
C) glossary
D) register
A) counter
B) accumulator
C) glossary
D) register
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
7
A(n) ____ object displays a collection of items, or values, with one item per line.
A) TextBox
B) RadioButton
C) ListBox
D) CheckBox
A) TextBox
B) RadioButton
C) ListBox
D) CheckBox
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
8
Menu item hot keys are case sensitive.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
9
Smart actions can be specified for a menu by using Action Tags .
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
10
A(n) ____ is a group of commands presented in a list.
A) action list
B) input box
C) menu
D) status bar
A) action list
B) input box
C) menu
D) status bar
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
11
Double-clicking a menu item in design mode opens the code editing window to the Click event handler for that menu item.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
12

A) baseline
B) smart
C) indexed
D) object-oriented
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
13
The hot key for a menu item can be activated with the keyboard by pressing the ____ key and the hot key at the same time.
A) ALT
B) SHIFT
C) CTRL
D) TAB
A) ALT
B) SHIFT
C) CTRL
D) TAB
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
14
Which line of code will add the value "East" to a ListBox object named lstDirections?
A) lstDirections.Add("East")
B) lstDirections.Items.Add("East")
C) lstDirections.AddValue("East")
D) lstDirections.Items.AddValue("East")
A) lstDirections.Add("East")
B) lstDirections.Items.Add("East")
C) lstDirections.AddValue("East")
D) lstDirections.Items.AddValue("East")
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
15
The ____ property of a ListBox object identifies which item in the ListBox was selected.
A) Item
B) ItemSelected
C) Selected
D) SelectedItem
A) Item
B) ItemSelected
C) Selected
D) SelectedItem
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
16

A) Menu
B) Action
C) Legend
D) Glossary
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
17
The Selected property of a ListBox object identifies which item in the ListBox has been selected.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
18
The ____ function provides a dialog box that asks the user for input and provides an input area.
A) InputArea
B) InputBox
C) MessageBox
D) UserEntry
A) InputArea
B) InputBox
C) MessageBox
D) UserEntry
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
19
When used in a menu name, the asterisk character is used to indicate that a character is a hot key.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
20
The ____ prefix is used for a MenuStrip object.
A) menu
B) mns
C) mst
D) mnu
A) menu
B) mns
C) mst
D) mnu
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
21
A(n) ____-controlled loop tests the condition before the loop body is executed.
A) bottom
B) key
C) top
D) function
A) bottom
B) key
C) top
D) function
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
22
If ____ appears as the first line of a loop, the loop is a top-controlled Do loop that will stop execution when a condition becomes true.
A) Loop While
B) Do While
C) Loop Until
D) Do Until
A) Loop While
B) Do While
C) Loop Until
D) Do Until
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
23
The ____ follows the keyword For in a For...Next loop.
A) keyword Next
B) keyword Step
C) keyword To
D) control variable
A) keyword Next
B) keyword Step
C) keyword To
D) control variable
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
24
The ____ function can be used to test if data entered by the user is numeric.
A) IsInteger
B) IsNumber
C) IsNumeric
D) IsNonAlpha
A) IsInteger
B) IsNumber
C) IsNumeric
D) IsNonAlpha
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
25
How many times will the following loop execute? For intCount = 10 To 16 Step 2 'Body of Loop Next
A) 3
B) 4
C) 6
D) 7
A) 3
B) 4
C) 6
D) 7
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
26
How many times will the following loop execute? For intCount = 10 To 1 Step -2 'Body of loop Next
A) 4
B) 5
C) 9
D) 10
A) 4
B) 5
C) 9
D) 10
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
27

A) breakpoints
B) debug points
C) halt points
D) tracepoints
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
28
The compound operator ____ adds the value of the right operand to the value of the left operand and stores the result in the left operand's variable.
A) ++
B) +=
C) =+
D) ==
A) ++
B) +=
C) =+
D) ==
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
29

A) breakaway
B) infinite
C) runaway
D) unstoppable
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
30
A loop's ____ variable is a numeric variable that keeps track of the number of iterations the loop completes.
A) compound
B) accumulated
C) matrix
D) control
A) compound
B) accumulated
C) matrix
D) control
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
31
A(n) ____ is a single repetition of a loop.
A) rotation
B) iteration
C) revolution
D) accumulation
A) rotation
B) iteration
C) revolution
D) accumulation
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
32
A For...Next loop with a beginning value of 1, an ending value of 25, and a step value of 3 will execute ____ times.
A) 3
B) 8
C) 9
D) 25
A) 3
B) 8
C) 9
D) 25
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
33
Using a preset value for the variable tested in a loop condition is a process called ____ the loop.
A) iterating
B) priming
C) presetting
D) rebanding
A) iterating
B) priming
C) presetting
D) rebanding
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
34
A(n) ____-controlled loop tests the condition after the code in the loop body has been executed.
A) bottom
B) function
C) top
D) key
A) bottom
B) function
C) top
D) key
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
35
If ____ appears as the last line of a loop, the loop is a bottom-controlled Do loop that will stop execution when a condition becomes true.
A) Loop While
B) Do While
C) Until
D) Loop Until
A) Loop While
B) Do While
C) Until
D) Loop Until
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
36
If ____ appears as the first line of a loop, the loop is a top-controlled Do loop that will execute as long as a condition remains true.
A) Loop While
B) Do While
C) Loop Until
D) Do Until
A) Loop While
B) Do While
C) Loop Until
D) Do Until
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
37
A(n) ____ loop is best used when the specific number of iterations required is known.
A) Do…While
B) Do…Until
C) For...Next
D) For…Until
A) Do…While
B) Do…Until
C) For...Next
D) For…Until
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
38
The compound operator ____ is used to add a string to an existing string.
A) &=
B) =&
C) &&
D) ==
A) &=
B) =&
C) &&
D) ==
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
39
What will be the value of the variable intTotalCount when the following code is executed? For intOuterCount = 1 to 5 For intInnerCount = 1 to 4 intTotalCount +=1 Next Next
A) 4
B) 5
C) 9
D) 20
A) 4
B) 5
C) 9
D) 20
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
40
If ____ appears as the last line of a loop, the loop is a bottom-controlled Do loop that will execute as long as a condition remains true.
A) Loop While
B) Do While
C) Loop Until
D) Do Until
A) Loop While
B) Do While
C) Loop Until
D) Do Until
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
41
You can create a deployed version of a program by using the ____ process.
A) ClickDeploy installation
B) ClickInstall Deployment
C) ClickOnce Deployment
D) ClickPublish Deployment
A) ClickDeploy installation
B) ClickInstall Deployment
C) ClickOnce Deployment
D) ClickPublish Deployment
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
42
When in break mode, you can use ____ to examine the value of variables.
A) DataTags
B) DataTips
C) DebugTags
D) DebugTips
A) DataTags
B) DataTips
C) DebugTags
D) DebugTips
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
43
You must include a Step value in a For...Next loop, even if the Step value is 1.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
44
The prompt message displayed in an InputBox object can be customized by the programmer.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
45
It is best to indent the body of the loop, to identify clearly the code that is being repeated.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
46
A hot key in a menu name must be the first letter.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
47
In order to run a program deployed with ClickOnce Deployment, the computer needs ____ installed on it.
A) Microsoft Word 2007
B) Visual Studio 2008
C) PowerBuilder
D) none of the above
A) Microsoft Word 2007
B) Visual Studio 2008
C) PowerBuilder
D) none of the above
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
48

A) blue
B) green
C) red
D) yellow
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
49
The beginning, ending, and step values used in a For...Next loop can vary based on input from a user.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
50
The InputBox function returns a null string ("") when a user clicks the Cancel button.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
51
A Step value in a For...Next loop can be positive or negative.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
52
The beginning and ending values for a For...Next loop must be predefined and cannot contain an expression.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
53
MenuStrip objects can be placed along any edge of the form, depending on which side is closer to the mouse pointer.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
54
If the user enters a numeric value in an InputBox object, the InputBox function will return a numeric data type.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
55
Writing an event handler for a menu item is the same as writing an event handler for a button click.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
56
Before deployment, an application should be ____.
A) complete
B) working properly
C) debugged
D) all of the above
A) complete
B) working properly
C) debugged
D) all of the above
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
57
The Step value for a For...Next loop must be a positive whole integer value.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
58
Assigning a default value of something other than a null string in an input box is recommended to allow the program to differentiate between the user clicking Cancel and the user failing to enter data.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
59
An InputBox object allows user input without the need for a TextBox object on the Windows Form object.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
60
All data collected by an InputBox object is automatically converted to the best data type for the data.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
61
The ____________________ property of a ListBox identifies which item was selected.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
62
The non-graphical Toolbox objects, such as MenuStrip objects, are organized and displayed below the form in the ____________________ at the bottom of the Visual Studio IDE.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
63
In Visual Studio 2008, a(n) ____________________ object is used to place menus at the top of a Windows Application form.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
64
Starting a loop with a preset value for the variable tested in the condition is called priming the loop.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
65
Use a For...Next loop when the number of repetitions is unknown.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
66
A(n) ____________________ value is the value in a For...Next loop that is added to, or subtracted from, the beginning value on each iteration of the loop.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
67
In a Do While loop, the body of the loop is executed until the condition becomes true.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
68
When expecting a number from an input box, the IsNumeric function should be used to ensure that the input data can be converted to a numeric variable.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
69
Loops cannot be nested.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
70
A top-controlled loop is always executed at least once.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
71
The installation files created by the ClickOnce Publishing wizard can be used for a software release.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
72
The keyword ____________________ is the last line of a For loop.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
73
The ____________________ procedure of the Windows Form object closes the form and causes the program to exit.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
74
A(n) ____________________ is a group of commands, or items, presented in a list.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
75
A(n) ____________________ is a strip across the top of a window that contains one or more menu names.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
76

Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
77
A(n) ____________________ object is a dialog box used to allow the program to accept input from the user.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
78
Breakpoints are stop points placed in the code where execution will be paused when running the program in Visual Studio in debug mode.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
79
The ____________________ method of the ListBox object's Items property is used to add items to the list.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck
80
When nesting loops, the inner loop must be completely contained in the outer loop and must use a different control variable.
Unlock Deck
Unlock for access to all 107 flashcards in this deck.
Unlock Deck
k this deck