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 Menus35 Questions
Exam 8: Arrays and More34 Questions
Exam 9: Files, Printing, and Structure36 Questions
Exam 10: Working With Databases32 Questions
Exam 11: Developing Web Applications33 Questions
Exam 12: Classes, Collections, and Inheritance36 Questions
Select questions type
To get the number of items stored in a ListBox, use the ______property.
Free
(Multiple Choice)
4.7/5
(37)
Correct Answer:
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:
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:
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)
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)
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)
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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)