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