McGraw-Hill OnlineMcGraw-Hill Higher EducationLearning Center
Student Center | Instructor Center | Information Center | Home
Intro to VB.NET
Projects
Comprehensive Projects
Chapter Objectives
PowerPoint Presentations
Multiple Choice Quiz
True or False
Examples from the Text
Feedback
Help Center


Learning Programming Using Visual Basic.Net
Bill Burrows, University of Washington
Joe Lanford, University of Rochester

Repeating Processing Tasks: Loop Structures

Multiple Choice Quiz



1

A(n) ____ is a structure or flow of control used to repeatedly execute a group of statements for a specified time or range.
A)procedure
B)loop
C)ring
D)thread
2

One pitfall of writing loops is the possibility of creating a never-ending series of executions known as a(n) __________ loop.
A)terminal
B)sticky
C)ugly
D)infinite
3

This type of loop structure is best suited for situations in which the developer does not know how many times the loop will need to execute.
A)Infinite Loop
B)If...Then
C)Do...Loop
D)For...Next
4

A(n) _____________ __________ is a condition specified in a loop that will terminate execution of a loop should the condition evaluate to a true value.
A)finishing statement
B)termination condition
C)abort situation
D)sentinel value
5

One complete execution of all of the statements of a loop body is called a(n) __________.
A)revolution
B)iteration
C)cycle
D)circle
6

This form of loop control structure is used when a developer does not know how many iterations of the loop will execute, but they require at least one iteration to occur.
A)MIN-1 loop
B)Do...Loop
C)Do While...Loop
D)Do... Loop While
7

The technique of setting a variable to a special or known value immediately before entering a loop structure which uses that variable to control its execution is called ______________.
A)initialization
B)baiting
C)dictating
D)None of the above
8

The value used in a For...Next loop to keep track of the number of iterations that have been executed is called a(n) _______.
A)key
B)sentinel
C)accumulator
D)counter
9

When the block of code below finishes execution, what will the final value of X be?

Dim Y As Integer = "10"
Dim X As Integer = 0
For Count = Y To 1 Step -2
X = X + Y
If Y = (Y=1) Then
Exit For
End If
Next Count
X = X / X
A)30
B)10
C)1
D)Nothing - this is an infinite loop
10

Suppose you need to develop an online poll of user responses to a question. For convenience, you would like the most popular options to be displayed in a list for the user to quickly select an option and submit their answer. However, you would also like them to be able to use the same control to allow them to specify an write-in value of their own. Which control is most appropriate for this application?
A)ListBox
B)ComboBox
C)TextBox
D)Button




McGraw-Hill/Irwin