COSC Chapter 8 Quiz*
Which of the following array declarations would be best suited for storing the retail prices?
Declare Real retailPrice[SIZE]
True/False: Arrays, like variables, can only hold one value at a time.
False
True/False: If array name contains a list of names, name[1] is the name of the first person.
False
True/False: One of the advantages of two- or more dimensional arrays is that the data values can be of two or more data types.
False
True/False: Unlike variables, arrays need to be initialized separately from the declaration.
False
What is the subscript for the data value 92 in the example given below? Declare Integer score [5] = 83, 92, 78, 94, 71
One
A three-dimensional array can be thought of as ________ of two-dimensional arrays.
Pages
Two-dimensional arrays can be thought of as containing ________.
Rows and columns
What is the term used for the number inside the bracket that specifies the number of values that an array can hold?
Size declarator
Which of the following arguments must be passed when passing an array as an argument?
The array itself & an integer that specifies the number of elements in the array A&B
Which of the following statement is true about the statement below? Declare Integer score [5] = 83, 92, 78, 94, 71
This is an array declaration and initialization.
True/False: Subscripts are used to identify specific elements in an array.
True
True/False: To calculate the total of the values in an array, a loop is used with an accumulator variable.
True
How many subscripts do you need to access one element in a two-dimensional array?
Two
A partially filled array is normally used with ________.
an accompanying integer variable that holds the number of items that are actually stored in the array