ptg7068951
118 HOUR 9:Storing Information with Arrays
Workshop
If the brain were an array,you could test its lengthby answering each of the
following questions about arrays.
Quiz
- What types of information are arrays best suited for?
A. Lists
B. Pairs of related information
C. Tr i v i a - What variable can you use to check the upper boundary of an array?
A. top
B. length
C. limit - How many reindeer does Santa have,including Rudolph?
A. 8
B. 9
C. 10
Answers
- A.Lists that contain nothing but the same type of information—strings,
numbers,and so on—are well-suited for storage in arrays. - B.Thelengthvariable contains a count of the number of elements in
an array. - B.Santa had “eight tiny reindeer,” according to Clement Clarke Moore’s
“A V isit from St. Nicholas,” so Rudolph makes nine.