Professional Documents
Culture Documents
Programming Logic and Design: Fifth Edition, Comprehensive
Programming Logic and Design: Fifth Edition, Comprehensive
Design
Fifth Edition, Comprehensive
Chapter 6
Arrays
Objectives
• Understand arrays and how they occupy computer
memory
• Manipulate an array to replace nested decisions
• Use a named constant to refer to an array’s size
• Declare and initialize an array
• Understand the difference between variable and
constant arrays
Table 6-1 Declaring a 20-element array named count in several common languages
Figure 6-8 A loop that sets values for every element in an array
Programming Logic and Design, Fifth Edition, Comprehensive 20
Variable and Constant Arrays
Figure 6-25 Pseudocode that uses a for loop to print month names
Programming Logic and Design, Fifth Edition, Comprehensive 46
Figure 6-26 Pseudocode that uses a more efficient for loop to print month names