Array Data Structures
- Arrays as simple structures
- Some examples and uses
- Creating arrays dynamically at runtime
In Chapter 2, we discussed issues that arise if a list of items is represented using separate discrete variables. In this chapter, we see how arrays deal with these issues. We show how items are stored and manipulated as an array, and build a simple example application.
5.2 WHAT IS AN ARRAY?
Consider the eight integers that we touched on in Chapter 2, Section 2.4. It is not efficient to declare eight separate variables with discrete identifiers; instead, make the following declaration:
int numbers ...