CIS116: QUIZ 8

Ace your homework & exams now with Quizwiz!

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

Array

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

Declare Real retailPrice[SIZE]

Arrays, like variables, can only hold one value at a time. - True - False

False

If array name contains a list of names, name[1] is the name of the first person. - True - False

False

In a sequential search algorithm, the Boolean variable used as a flag is initialized to TRUE. - True - False

False

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

False

Unlike variables, arrays need to be initialized separately from the declaration. - True - False

False

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

Integer

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

One

The expression score[5] is pronounced ________. - Score sub 5 - Score sub 4 - Score of 4 - Score 5 - Score of 5

Score sub 5

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

Size declarator

Access the individual elements in an array by using their ________. - Sizes - Numbers - Integers - Subscripts - None of these

Subscripts

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.

This is an array declaration and initialization

The first step in calculating the average of the values in an array is to get the total of the values. - True - False

True

To calculate the total of the values in an array, a loop is used with an accumulator variable. - True - False

True

When processing the data in a two-dimensional array, each element has two subscripts. - True - False

True

How many subscripts do you need to access one element in a two-dimensional array? - One - Two - Three - Four - None of these

Two

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

an accompanying integer variable that holds the number of items that are actually stored in the array

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

array bounds checking

Every element in an array is assigned a unique number known as a ________. - subscript - integer - character - number - None of these

subscript


Related study sets

understanding the nature of science

View Set

Physical Assessment Study Questions

View Set

Chapter 3- Business Idea Generation

View Set

Environmental Science: Atmospheric Circulation

View Set