Chapter 5

Arrays

This chapter describes the representation of linear data structures by using one of the methods of sequential allocation of storage. Other methods of storage allocation will be discussed in the chapter on Pointers and Functions. Although the linear method of allocation is suitable for certain applications, there are many applications where this is found unacceptable. However, this method is widely used and helps in development of simpler programs. Initially, we focus on arrays in C, both single-dimensional and multi-dimensional, and then proceed to the different initialization techniques. Operations on matrices are introduced. Two types of sequential representations of multi-dimensional arrays are introduced. A string is not ...

Get C Programming Essentials 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.