Section 7.1 Creating and Using Arrays
1.
After the following Dim statement is executed, how many elements will the array myVar have? Dim myVar(7) As Double
(A)
(B)
(C)
(D)
2.
0
1
8
9
C
In the line of code
Dim scores() As Integer = {55, 33, 12}
the upper bound of the array scores is which of the following?
(A)
(B)
(C)
(D)
3.
2
1
11
0
A
Each individual variable in the list student(0), student(1), student(2)
is known as a(n)
(A)
(B)
(C)
(D)
4.
subscript. dimension. element. type. C
In the statement
Dim scores(30) As Double
the number 30 designates which of the following?
(A)
(B)
(C)
(D)
the highest value of the subscripts of the elements for the array scores the maximum value that can be assigned to any element in the array scores the data type for the array scores the value initially assigned to each element in the array scores
A
5.
Which statement is true regarding the following Dim statement?
Dim states(49) As String, populations(49) As Double
(A)
(B)
(C)
(D)
6.
It is invalid since more than one array is dimensioned by a single Dim statement.
It is invalid since the two arrays must have the same data type.
The subscripts of states range from 1 to 49.
The subscripts of populations range from 0 To 49.
D
The Count method returns what information about an array?
(A) the highest number that can be used as a subscript for the array
(B) the largest value that can be assigned to an array element
(C) the number of elements in the array
(D)tThe highest dimension of the array
C
7.
In the line of code
For index As Integer = 0 to (score.Count - 1)
the Count method is used to carry out which of the following tasks?
(A)
(B)
(C)
(D)
8.
The ReDim statement causes an array to lose its current contents unless the word ReDim is followed by the keyword
(A)
(B)
(C)
(D)
9.
determine the largest value for each of the elements determine the largest subscript in the array determine the smallest value for each of the elements declare a new array with