Exam 5: Lists and Loops
Exam 1: Introduction to Programming and Visual Basic40 Questions
Exam 2: Creating Applications With Visual Basic36 Questions
Exam 3: Variables and Calculations41 Questions
Exam 4: Making Decisions39 Questions
Exam 5: Lists and Loops36 Questions
Exam 6: Procedures and Functions31 Questions
Exam 7: Multiple Forms, Modules, and Menus36 Questions
Exam 8: Arrays and More34 Questions
Exam 9: Files, Printing, and Structures36 Questions
Exam 10: Working With Databases32 Questions
Exam 11: Developing Web Applications33 Questions
Exam 12: Classes, Collections, and Inheritance36 Questions
Select questions type
Setting this property to True will put the items in a ListBox in alphabetical order.
(Multiple Choice)
4.9/5
(33)
What is wrong with the following code? Dim intIndex As Integer
For intIndex = 5 To 1
ListBox.Items.AddintIndex.ToString)
Next
(Multiple Choice)
4.9/5
(28)
If lstMonths is a ListBox, which of the following will cause an exception to be thrown?
(Multiple Choice)
4.8/5
(38)
What is the difference in execution between the two following sections of code? 'Example 1
IntCounter = 0
Do While intCounter < 10
LstOutput.Items.AddintCounter * intCounter)
IntCounter = intCounter + 1
Loop
'Example 2
For intCounter = 0 to 9
LstOutput.Items.AddintCounter * intCounter)
Next intCounter
(Multiple Choice)
4.8/5
(26)
To get the number of items stored in a ListBox, use the _property.
(Multiple Choice)
4.8/5
(41)
Which of the following sections of code will calculate the monthly payment for a $150,000 house with a 30 year mortgage at an annual rate of 5.5%, and assign the result to dblMPay?
(Multiple Choice)
4.9/5
(38)
What is the difference in the execution of the Do Until Loop first example) and the Do Loop Until second example)? ' First Example
SngPayAmount = 200
Do Until sngPayAmount > 150
SngPayAmount = sngPayAmount - 50
Loop
'Second Example
SngPayAmount = 200
Do
SngPayAmount = sngPayAmount - 50
Loop Until sngPayAmount > 150
(Multiple Choice)
4.8/5
(35)
Which of the following statements correctly displays an input box?
(Multiple Choice)
4.8/5
(36)
Suppose you would like your code to perform several tasks: Use a For…Next loop with an InputBox to prompt the user four times for the price of four different T-shirts, then display each shirt price with a 25% discount in the ListBox lstResult. Which of the following code segments correctly performs these tasks?
(Multiple Choice)
4.9/5
(29)
A difference between a ListBox and a drop-down ComboBox is ____.
(Multiple Choice)
4.8/5
(27)
Which statement is True in regard to the following code? intCount = 0
Do While intCount < 10
LstOutput.Items.Add"Good Job")
Loop
(Multiple Choice)
4.9/5
(39)
A counter is an) ___that can be incremented or decremented each time a loop runs.
(Multiple Choice)
4.8/5
(41)
Which type of loop uses a pretest to initialize a counter variable and then increment the counter variable at the end of each iteration?
(Multiple Choice)
4.9/5
(36)
Showing 21 - 36 of 36
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)