1. Which of the following declares a five-element one-dimensional array?
1. Dim intSold(4) As Integer
2. Dim intSold(5) As Integer
3. Dim intSold(4) As Integer = {4, 78, 65, 23, 2}
4. Dim intSold(5) As Integer = {4, 78, 65, 23, 2}
2. The strItems array is declared as follows: Dim strItems(20) As String.
The intSub variable keeps track of the array subscripts and is initialized to 0. Which
of the following Do clauses will process the loop instructions for each element in
the array?
1. Do While intSub > 20
2. Do While intSub < 20
3. Do While intSub >= 20
4. Do While intSub <= 20
3. The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000,
900, 500, 20000}. What will the intSales(2) += 10 statement do?
1. It will replace the 900 amount with 10.
2. It will replace the 900 amount with 910.
3. It will replace the 12000 amount with 10.
4. It will replace the 12000 amount with 12010.
, 4. The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000,
900, 500, 20000}. If the intSub variable contains the number 0 before the loop is
processed, which of the following loops will correctly multiply each array element
by 2?
1.
2.
3.
4.
1. Dim intSold(4) As Integer
2. Dim intSold(5) As Integer
3. Dim intSold(4) As Integer = {4, 78, 65, 23, 2}
4. Dim intSold(5) As Integer = {4, 78, 65, 23, 2}
2. The strItems array is declared as follows: Dim strItems(20) As String.
The intSub variable keeps track of the array subscripts and is initialized to 0. Which
of the following Do clauses will process the loop instructions for each element in
the array?
1. Do While intSub > 20
2. Do While intSub < 20
3. Do While intSub >= 20
4. Do While intSub <= 20
3. The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000,
900, 500, 20000}. What will the intSales(2) += 10 statement do?
1. It will replace the 900 amount with 10.
2. It will replace the 900 amount with 910.
3. It will replace the 12000 amount with 10.
4. It will replace the 12000 amount with 12010.
, 4. The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000,
900, 500, 20000}. If the intSub variable contains the number 0 before the loop is
processed, which of the following loops will correctly multiply each array element
by 2?
1.
2.
3.
4.