Topic 6: Arrays Flashcards
1
Q
Series or list of variables in computer memory
A
Array
2
Q
Position number of an item in an array
A
Subscript (or index)
3
Q
An item in the array
A
Element
4
Q
Number of elements an array will hold
A
Size of the array
5
Q
Individual elements have unique ________
A
subscript
6
Q
- Numeric with no decimal places
- Initialized to 0
- Incremented by 1 each time the logic passes through the loop
A
Array subscript variable must be:
7
Q
- To hold the size of an array
- As the array values
- As a subscript
A
Using Constants with Arrays
8
Q
unnamed constants
A
“magic numbers”
9
Q
when using a constant as the size of an array, make sure the _____ remains less than the constant value.
A
subscript
10
Q
Sometimes the values stored in arrays should be _______ (ex. months of the year)
A
constants
11
Q
Each element in one array associated with element in same relative position in other array
A
Parallel arrays
12
Q
- Two or more arrays contain related data
- A subscript related the arrays
A
Using parallel arrays
13
Q
A