CIS 103 - CHAPTER 6

A subscript is a(n) _____.

number that indicates the position of an array element

Each variable in an array must have the same _____ as the others.

data type

Each data item in an array is called a(n) _____.

element

The subscripts of any array are always _____.

integers

Suppose that you have an array named number, and two of its elements are
number[1] and number[4]. You know that _____.

there are exactly two elements between those two elements

Suppose that you want to write a program that inputs customer data and displays a summary of the number of customers who owe more than $1000 each, in each of 12 sales regions. Customer data variables include name, zipCode, balanceDue, and regionNumber. At

regionNumber

The most useful type of subscript for manipulating arrays is a _____.

variable

A program contains a seven-element array that holds the names of the days of the week. At the start of the
program, you display the day names using a subscript named dayNum. You display the same array values again at the end of the program, where you ____

can use dayNum, but can also use another variable

Suppose that you have declared an array as follows:
num
values[4] = 0, 0, 0, 0
. Which of the
following is an allowed operation?

values[2] = 17
input values[0]
values[3] = values[0] + 10
all of the above

Filling an array with values during a program's execution is known as _____ the array.

populating

Using an array can make a program _____.

easier to understand

A _____ is a variable that can be set to indicate whether some event has occurred.

flag

What do you call two arrays in which each element in one array is associated with the element in the same relative position in the other array?

parallel arrays

In most modern programming languages, the highest subscript you should use with a 12-element array is _____.

11 (because arrays start with 0)

Parallel arrays _____.

frequently have an indirect relationship

Each element in a seven-element array can hold _____ value(s).

One

After the annual dog show in which the Barkley Dog Training Academy awards points to each participant, the
academy assigns a status to each dog based on the criteria in Table 6-1.
Points Earned - Level of Achievement
0-5 ----- Good
6-7 ----- Excellent
8-9

5, 7, 9, 10

When you use a subscript value that is negative or higher than the number of elements in an array, _____.

the resulting action depends on the programming language used

In every array, a subscript is out of bounds when it is _____.

negative

You can access every element of an array using a _____.

while loop and for loop