Exam 5: Lists and Loops

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which statement about the ListBox.Add method is true?

(Multiple Choice)
4.8/5
(25)

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)

The first item in a ListBox has an index of .

(Multiple Choice)
4.8/5
(39)

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)

This method erases all the items in a ListBox.

(Multiple Choice)
4.7/5
(35)

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
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)