6. Arrays: All in a Row...

One of the themes in this book so far has been that computers can only carry out instructions that are precise and clear. How, then, can a computer operate on thousands, millions, even billions of bytes of data?

The answer is that programming languages permit you to define something called an array. An array is a data structure that has similar items of data—called elements—and it can have as many of these items as you want.

The beauty of this mechanism is that as long as you can control and define the general case, it’s as easy for a program to operate on an exceptionally large array (even billions of items, if memory will allow) as it is to operate on a small one.

This is a major clue as to why computers and programming ...

Get C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.