Exam 9: Arrays
Exam 1: An Introduction to Visual Basic 201544 Questions
Exam 2: Designing Applications60 Questions
Exam 3: Using Variables and Constants60 Questions
Exam 4: The Selection Structure60 Questions
Exam 5: More on the Selection Structure58 Questions
Exam 6: The Repetition Structure60 Questions
Exam 7: Sub and Function Procedures60 Questions
Exam 8: String Manipulation60 Questions
Exam 9: Arrays60 Questions
Exam 10: Structures and Sequential Access Files60 Questions
Exam 11: Classes and Objects60 Questions
Exam 12: Web Applications60 Questions
Exam 13: Working With Access Databases and Linq60 Questions
Exam 14: Access Databases and SQL60 Questions
Select questions type
An array is defined as follows:
Dim numbers(3) As Integer
How many elements does the array have?
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
D
Write the statement to declare a four-element procedure-level array named intNum with each element initialized to 0.Then write the statements necessary to add the number 5 to each element in the intNum array.
Free
(Short Answer)
4.9/5
(34)
Correct Answer:
Dim intNum(3)As Integer
For intSubscript As Integer = 0 To 3
intNum(intSubscript)+= 5
Next intSubscript
The following array is declared and initialized:
Dim dblMilesPerTrip()As Double = {542,28,79.5,322.6,114}
Write the statements to sort the values in the array in descending order.
Free
(Essay)
4.9/5
(39)
Correct Answer:
Array.Sort(dblMilesPerTrip)
Array.Reverse(dblMilesPerTrip)
If the array's data type is Integer,each element in the array is initialized using the keyword Nothing.
(True/False)
4.8/5
(35)
Based on the code below,intScores(3,1)is initialized to ____.
Dim intScores(,) As Integer = {{75, 90}, {9, 25}, {23, 56}, {6, 12}}
(Multiple Choice)
4.9/5
(45)
Case 1 - Tony’s Pizza & Pasta
The restaurant uses an application to update and display menu items and the related price information.
-Daily "Chef's Specials" are stored using two one-dimensional parallel arrays.The days of the week are stored in the strDays array,with Sunday as the first element.The daily special for each day is stored in a parallel array named strSpecial.Which of the following statements assigns Friday's special,which is rigatoni,to the appropriate element?
(Multiple Choice)
4.8/5
(30)
The strRoom and strRate arrays are parallel arrays.If Deluxe is stored in the third element in the strRoom array,where is its rate (115)stored?
(Multiple Choice)
4.8/5
(37)
Case 1 - Tony’s Pizza & Pasta
The restaurant uses an application to update and display menu items and the related price information.
-Which of the following statements assigns the daily special of lasagna to Tuesday?
(Multiple Choice)
5.0/5
(36)
The syntax ____ assigns either the value entered in the txtSales control (converted to Decimal)or the number 0 to the third element in the decSales array.
(Multiple Choice)
4.9/5
(33)
Consider the following array: =
Dim numbers(,) As Integer = {{1,2},{3,4},{4,5},{6,7},{8,9}}
What row index value would be required to create this two-dimensional array?
(Multiple Choice)
4.8/5
(47)
Write the statement to declare a twelve-row,two-column procedure-level array named strLocations,initializing each element to the keyword Nothing.
(Short Answer)
5.0/5
(44)
The data used to initialize the elements of an array is enclosed in ____.
(Multiple Choice)
5.0/5
(32)
A(n)____ is a group of variables that have the same name and data type,and are related in some way.
(Multiple Choice)
4.8/5
(43)
The following array is declared and initialized:
Dim dblMilesPerTrip()As Double = {542,28,79.5,322.6,114}
Write the statements to total the values in the array.
(Essay)
4.8/5
(31)
Write the statement to declare a seven-element procedure-level array named strItemCode with each element initialized to the keyword Nothing.
(Short Answer)
4.9/5
(40)
Based on the code below,intScores(0,0)is initialized to ____.
Dim intScores(,) As Integer = {{75, 90}, {9, 25}, {23, 56}, {6, 12}}
(Multiple Choice)
4.7/5
(41)
An array called state()is loaded as follows:
Dim state() As String = {"Ohio", "Michigan", "California", "Arizona"}
What is the value of the subscript used to reference "Arizona"?
(Multiple Choice)
4.7/5
(38)
Write the statements to traverse the strCategory array and display each element's value in the lstCategory control.Use a For Each...Next statement.
(Essay)
4.7/5
(34)
Showing 1 - 20 of 60
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)