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/112
Play
Full screen (f)
Deck 6: Loop Structures
1
The Publish Wizard allows you to create an install file to be placed on a ____.
A)USB drive
B)network
C)web server
D)hard disk
A)USB drive
B)network
C)web server
D)hard disk
A,B,C,D
2
____ is a fundamental process that repeats instructions until a condition is true or while a condition is true.
A)Iteration
B)Concatenation
C)Looping
D)Documenting
A)Iteration
B)Concatenation
C)Looping
D)Documenting
A,C
3
Double-tapping or double-clicking a button object on the Windows Form object opens the event handler for that button._________________________
True
4
Instead of typing the menu name on a MenuStrip object,you can add a ____ by clicking the Type Here box's list arrow and selecting the appropriate choice
A)radio button
B)combo box
C)menu item
D)text box
A)radio button
B)combo box
C)menu item
D)text box
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
5
A ____ 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 112 flashcards in this deck.
Unlock Deck
k this deck
6
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 112 flashcards in this deck.
Unlock Deck
k this deck
7
A(n)____ key provides 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 112 flashcards in this deck.
Unlock Deck
k this deck
8
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 112 flashcards in this deck.
Unlock Deck
k this deck
9
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 112 flashcards in this deck.
Unlock Deck
k this deck
10
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 112 flashcards in this deck.
Unlock Deck
k this deck
11
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 112 flashcards in this deck.
Unlock Deck
k this deck
12
The Checked property of a ListBox object identifies which item in the ListBox has been selected._________________________
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
13
Smart actions can be specified for a menu by using Action Tags._________________________
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
14
The ____ values used in a For...Next loop can vary based on input from a user.
A)beginning
B)Step
C)ending
D)range
A)beginning
B)Step
C)ending
D)range
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
15
The feature shown in the accompanying figure provides an easy way for you to specify ____ actions for an object as you design a form.
A)baseline
B)smart
C)indexed
D)object-oriented
A)baseline
B)smart
C)indexed
D)object-oriented
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
16
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 112 flashcards in this deck.
Unlock Deck
k this deck
17

As shown in the accompanying figure,Visual Basic 2015 contains a(n)____ Tag that allows you to create a full standard menu bar commonly provided in Windows programs.
A)Menu
B)Action
C)Legend
D)Glossary
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
18
A compound operator allows you to ____ values,storing the result in the same variable.
A)add
B)multiply
C)subtract
D)divide
A)add
B)multiply
C)subtract
D)divide
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
19
Menu item hot keys are case sensitive._________________________
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
20
A(n)____ is a group of commands,or items,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 112 flashcards in this deck.
Unlock Deck
k this deck
21
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
'Body of loop
Next
A)4
B)5
C)9
D)10
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
22
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 112 flashcards in this deck.
Unlock Deck
k this deck
23
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 112 flashcards in this deck.
Unlock Deck
k this deck
24
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 112 flashcards in this deck.
Unlock Deck
k this deck
25
A ____-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 112 flashcards in this deck.
Unlock Deck
k this deck
26
A ____ 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 112 flashcards in this deck.
Unlock Deck
k this deck
27
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 112 flashcards in this deck.
Unlock Deck
k this deck
28
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 112 flashcards in this deck.
Unlock Deck
k this deck
29
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
'Body of Loop
Next
A)3
B)4
C)6
D)7
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
30
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 112 flashcards in this deck.
Unlock Deck
k this deck
31
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 112 flashcards in this deck.
Unlock Deck
k this deck
32
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 112 flashcards in this deck.
Unlock Deck
k this deck
33
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
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
34
A ____ 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
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
35
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 112 flashcards in this deck.
Unlock Deck
k this deck
36
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 112 flashcards in this deck.
Unlock Deck
k this deck
37
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 112 flashcards in this deck.
Unlock Deck
k this deck
38
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 112 flashcards in this deck.
Unlock Deck
k this deck
39
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
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
40
A ____-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 112 flashcards in this deck.
Unlock Deck
k this deck
41
A hot key in a menu name must be the first letter.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
42
Writing an event handler for a menu item is the same as writing an event handler for a button tap or click.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
43
The BackgroundImage property of the Form object cannot use imported as the background image;the image must be drawn from the Visual Studio library.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
44
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 112 flashcards in this deck.
Unlock Deck
k this deck
45
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 112 flashcards in this deck.
Unlock Deck
k this deck
46
____ are stop points placed in the code to tell Visual Studio 2015 debugger where and when to pause the execution of the program.
A)Breakpoints
B)Debug points
C)Halt points
D)Tracepoints
A)Breakpoints
B)Debug points
C)Halt points
D)Tracepoints
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
47
The BackgroundImageLayout property can be changed to Center,Stretch,or Zoom.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
48
In order to run a program deployed with ClickOnce Deployment,the computer needs ____ installed on it.
A)Microsoft Word
B)Visual Studio 2015
C)PowerBuilder
D)none of the above
A)Microsoft Word
B)Visual Studio 2015
C)PowerBuilder
D)none of the above
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
49
Breakpoint lines are highlighted in what color?
A)blue
B)green
C)red
D)yellow
A)blue
B)green
C)red
D)yellow
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
50
The InputBox function returns a null string ("")when a user taps or clicks the Cancel button.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
51
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 112 flashcards in this deck.
Unlock Deck
k this deck
52
Before deployment,an application should be ____.
A)cloud-based
B)working properly
C)integrated
D)sampled
A)cloud-based
B)working properly
C)integrated
D)sampled
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
53
A loop that never ends is called a(n)____ loop.
A)breakaway
B)infinite
C)runaway
D)unstoppable
A)breakaway
B)infinite
C)runaway
D)unstoppable
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
54
You can use the InputBox function instead of a TextBox object to obtain input.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
55
When the user clicks the Cancel button in an input box and the InputBox function returns a null character,the program can test for the null character to determine further processing.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
56
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 112 flashcards in this deck.
Unlock Deck
k this deck
57
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 112 flashcards in this deck.
Unlock Deck
k this deck
58
You can place an executable version of a program on your hard disk,on a web server,or on a network server 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 112 flashcards in this deck.
Unlock Deck
k this deck
59
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
For intInnerCount = 1 to 4
IntTotalCount +=1
Next
Next
A)4
B)5
C)9
D)20
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
60
To remove the picture in the background of a form,in the Properties window press and hold or right-click the ellipsis button of the BackgroundImage property and select Reset.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
61
A Step value in a For...Next loop can be positive or negative.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
62
You must test the data a user enters to ensure it is accurate and that its use in other programming statements will not cause a program exception.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
63
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 112 flashcards in this deck.
Unlock Deck
k this deck
64
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 112 flashcards in this deck.
Unlock Deck
k this deck
65
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 112 flashcards in this deck.
Unlock Deck
k this deck
66
The ____________________ procedure of the Windows Form object closes a window and terminates a program.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
67
The installation files created by the ClickOnce Publishing Wizard can be used for a software release.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
68
Use a For...Next loop when the number of repetitions is unknown.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
69
In a Do While loop,the body of the loop is executed until the condition becomes true.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
70
In Visual Studio 2015,a(n)____________________ object is used to place menus at the top of a Windows Form.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
71
The Step value for a For...Next loop must be a positive whole integer value.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
72
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 112 flashcards in this deck.
Unlock Deck
k this deck
73
A(n)____________________ is a group of commands,or items,presented in a list.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
74
Only one breakpoint can be set in a program.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
75
The nongraphical Toolbox objects,such as MenuStrip objects,are organized and displayed below the form in the ____________________ at the bottom of the Visual Studio interface.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
76
A top-controlled loop is always executed at least once.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
77
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 112 flashcards in this deck.
Unlock Deck
k this deck
78
Breakpoints are stop points placed in the code where execution will be paused during the execution of the program,and enter debug mode.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
79
Loops cannot be nested.
Unlock Deck
Unlock for access to all 112 flashcards in this deck.
Unlock Deck
k this deck
80
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 112 flashcards in this deck.
Unlock Deck
k this deck