CIS116: QUIZ 8

24 July 2022
4.7 (114 reviews)
20 test answers

Unlock all answers in this set

Unlock answers (16)
question
To calculate the total of the values in an array, a loop is used with an accumulator variable. - True - False
answer
True
question
The expression score[5] is pronounced ________. - Score sub 5 - Score sub 4 - Score of 4 - Score 5 - Score of 5
answer
Score sub 5
question
If array name contains a list of names, name[1] is the name of the first person. - True - False
answer
False
question
How many subscripts do you need to access one element in a two-dimensional array? - One - Two - Three - Four - None of these
answer
Two
question
A partially filled array is normally used with ________. - a library function that performs array insertions - an accompanying variable that holds a copy of the last item stored in the array - an accompanying integer variable that holds the number of items that are actually stored in the array - a warning to the user that some of the elements contain invalid values - None of these
answer
an accompanying integer variable that holds the number of items that are actually stored in the array
question
What is the subscript for the data value 92 in the example given below? Declare Integer score [5] = 83, 92, 78, 94, 71 - One - Two - A - B - None of these
answer
One
question
Which of the following array declarations would be best suited for storing the retail prices? - Declare String retailPrice[SIZE] - Declare Real retailPrice[SIZE] - Declare Integer retailPrice[SIZE] - All of these - None of these
answer
Declare Real retailPrice[SIZE]
question
In a sequential search algorithm, the Boolean variable used as a flag is initialized to TRUE. - True - False
answer
False
question
When working with arrays, most programming languages perform ________, which means they do not allow programs to use invalid subscripts. - array bounds checking - buffer overrun protection - bitwise data execution - subscript binding - None of these
answer
array bounds checking
question
Arrays, like variables, can only hold one value at a time. - True - False
answer
False
question
Processing a large number of items in a(n) ________ is usually easier than processing a large number of items stored in separate variables. - Constant - Variable - Array - Loop - None of these
answer
Array
question
One of the advantages of two- or more dimensional arrays is that the data values can be of two or more data types. - True - False
answer
False
question
When processing the data in a two-dimensional array, each element has two subscripts. - True - False
answer
True
question
The first step in calculating the average of the values in an array is to get the total of the values. - True - False
answer
True
question
Access the individual elements in an array by using their ________. - Sizes - Numbers - Integers - Subscripts - None of these
answer
Subscripts
question
What is the term used for the number inside the bracket that specifies the number of values that an array can hold? - Size - Size declarator - Number - Number declarator - None of these
answer
Size declarator
question
Which of the following statement is true about the statement below? Declare Integer score [5] = 83, 92, 78, 94, 71 - This is an array size establishment. - This is an array declaration. - This is an array initialization. - This is an array declaration and size establishment. - This is an array declaration and initialization.
answer
This is an array declaration and initialization
question
In the following declaration, what is the data type of the elements of the array? Declare Integer numbers [SIZE] - SIZE - numbers - Integer - Declare - None of these
answer
Integer
question
Every element in an array is assigned a unique number known as a ________. - subscript - integer - character - number - None of these
answer
subscript
question
Unlike variables, arrays need to be initialized separately from the declaration. - True - False
answer
False