1D Arrays


Introduction to One-Dimensional Arrays

So far we have primarily been discussing arrays as if they were ordered lists. In fact this is a slight simplification. There is only one type of array which should be thought of as a standard list. These are one dimensional arrays. They are called one-dimensional because the data can be viewed entirely in one dimension. What that means is that you can think of the data in the array as being essentially one long chain. As we will see in the next topic, arrays can also extend to 2 dimensions, 3 dimensions, or any number of dimensions that you choose. The effect that the dimensions have on accessing the data is that one index number is needed for each dimension. In a one-dimensional array we can think of the single index as being an element's location in the list. This analogy will change slightly when we discuss arrays of higher dimensions.

Take a Study Break

Green YOUR SCHOOL!

Click here to get involved with dosomething.org!

John Krasinski's BIG MIRACLE

Click to watch the trailer and read exclusive star interviews!

Do you like Anna?

Read Dear Albert... from ANNA's perspective!

BATTLESHIP, the movie

Here's why we're super jazzed about it.


The Book

Cover image

Read What You Love, Anywhere You Like

Get Our FREE NOOK Reading Apps