Exam 5: Lists and Loops

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

To get the number of items stored in a ListBox, use the ______property.

Free
(Multiple Choice)
4.7/5
(37)
Correct Answer:
Verified

C

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?

Free
(Multiple Choice)
4.8/5
(46)
Correct Answer:
Verified

A

Which of the following statements will assign a random number between 1 and 50 inclusive to intNum?

Free
(Multiple Choice)
5.0/5
(36)
Correct Answer:
Verified

A

Which of the following statements correctly displays an input box?

(Multiple Choice)
4.8/5
(37)

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.8/5
(39)

The entries in a ListBox are stored in the ______property.

(Multiple Choice)
4.7/5
(33)

Setting this property to True will put the items in a ListBox in alphabetical order.

(Multiple Choice)
4.8/5
(32)

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.8/5
(44)

Which code example will calculate the number of checked items in a CheckedListBox named clbMovieNames and store the number in intCheckedMovies?

(Multiple Choice)
4.8/5
(45)

This method erases all the items in a ListBox.

(Multiple Choice)
4.8/5
(31)

A ________is a loop inside another loop.

(Multiple Choice)
4.8/5
(34)

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.9/5
(30)

All of the following are valid ComboBox style properties, except

(Multiple Choice)
4.7/5
(43)

What is wrong with the following code? Dim intIndex As Integer For intIndex = 5 To 1 ListBox.Items.Add(intIndex.ToString) Next

(Multiple Choice)
4.8/5
(30)

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.8/5
(36)

The SelectedItem property of a ListBox __________.

(Multiple Choice)
4.9/5
(39)

Which standard Visual Basic function returns the periodic payment amount for a loan?

(Multiple Choice)
4.7/5
(47)

Which type of loop repeats as long as its loop condition remains True?

(Multiple Choice)
4.9/5
(36)

A ToolTip is a _________that allows the programmer to create a small popup message that displays when the user places the mouse over a control.

(Multiple Choice)
4.8/5
(33)

Which of the following controls and methods provides a simple way to gather input from the user at runtime without placing a text box on a form?

(Multiple Choice)
4.9/5
(40)
Showing 1 - 20 of 36
close modal

Filters

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