Question 1.1. (TCO 11) Where does the element referred to with the number zero exist in an array? (Points : 3)

      [removed] One element before the first
      [removed] 
The first element
      [removed] 
It is determined by the declaration of the array.
      [removed] 
It would depend on how the array is opened, once declared. 

 

Question 2.2. (TCO 11) Which of the following is false? (Points : 3)

      [removed] All elements in an array have the same subscript.
      [removed] 
All elements of the array have the same data type.
      [removed] 
All elements in an array have the same name.
      [removed] 
The first element of the array has a subscript of zero. 

 

Question 3.3. (TCO 11) Suppose that we declare array foodArray() as having four elements, with corresponding values of "Bread," "Milk," "Banana," and "Sugar." What value will foodArray(2) concatenated with foodArray(0) have? (Points : 3)

      [removed] Milk Sugar
      [removed] 
Banana Sugar
      [removed] 
Milk Bread
      [removed] 
Banana Bread 

 

Question 4.4. (TCO 11) An array can store multiple variables known as _____. (Points : 3)

      [removed] subscripts
      [removed] 
a subscripted constant
      [removed] 
indices 
      [removed] 
elements 

 

Question 5.5. (TCO 11) What exception message would be issued by the system if your program attempts to access an array with a subscript value greater than the number of elements declared in the array? (Points : 3)

      [removed] "Array dumped to memory"
      [removed] 
"Index was outside the bounds of the array"
      [removed] 
"Invalid access: Retry, Cancel, or Abort?"
      [removed] 
"Unhandled exception" 

 

Question 6.6. (TCO 11) The easiest way to traverse an array or sequentially access each element in an array is to _____. (Points : 3)

      [removed] do a binary search
      [removed] 
sort the array and read it
      [removed] 
use a loop statement
      [removed] 
use sequential coding 

 

Question 7.7. (TCO 11) _____ can be used when data needs to be stored in a tabular format consisting of multiple rows and columns. (Points : 3)

      [removed] Two-dimensional arrays
      [removed] 
Indexed subscripts
      [removed] 
Complex subscripts
      [removed] 
List indexes 

 

Question 8.8. (TCO 11) What is the upper bound of the array score(), declared in the following line of code?

Dim score() As Integer = {55, 33, 12}
 (Points : 3)

      [removed] 2
      [removed] 
0
      [removed] 
11
      [removed] 


 

Question 9.9. (TCO 12) The ReDim statement causes an array to lose its current contents unless the word ReDim is followed by which keyword? (Points : 3)

      [removed] Preserve
      [removed] 
Keep
      [removed] 
Reserve
      [removed] 
Conserve

 

Question 10.10. (TCO 11) Given the Dim statement below, which set of statements will initialize all elements of myArray() to 100?

Dim myArray(100) As Double 
(Points : 3)

      [removed] For j = 0 to 100
          myArray(j) = 100
          Next

      [removed] 
For i = 0 To 100
         (i) = 100
         Next 

      [removed] 
myArray() is already initialized to 100 by the Dim statement.
      [removed] 
myArray = {100} 

 

Question 11.11. (TCO 11) Consider the following Visual Basic statements:

Dim nums(4) As Double
For index As Integer = 0 To 4
    nums(index) = 1 + (index * 2)
Next
 
What values are placed in the array by the above statements? (Show each element of the
array and the value for that element.)
(Points : 5)

 

    • 11 years ago
    CIS170A Quiz 6

    Purchase the answer to view it

    blurred-text
    • attachment
      cis170quiz6.docx