Chapter 9. Array Data Types

image with no caption

High-level language abstractions hide how the machine deals with composite data types (a complex data type built from, or composed of, smaller data objects). Although these abstractions are often convenient, if you don’t understand the details behind them you might inadvertently use some construct that generates unnecessary code or runs slower than is necessary. In this chapter, I’ll take a look at one of the most important composite data types: the array. I’ll consider the following topics:

  • The definition of an array

  • How to declare arrays in various languages

  • The memory representation of arrays

  • Accessing elements of arrays ...

Get Write Great Code, Volume 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.