Skip to main content
Logo image

Chapter 24 Multidimensional Arrays

Sometimes we may wish to store data that is more complex than a simple list. For example, in order to analyze your home improvement weatherization efforts you might be interested in recording the temperature in you room on a grid of \((x,y)\) coordinates. For such purposes C (and other programming languages) offers the concept of a multidimensional array. A two-dimensional array, for example, would have a certain number of rows and columns, compared to a one-dimensional array which just has elements in a single row. In this chapter, we will explore the possibilities that multidimensional arrays introduce to our code and practice using them in various scenarios.