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

SparkLife

What's your Pretty Little Liars name?

Take this quiz to find out!

SparkLife

Which young actress just got married?

Click to find out!

SparkLife

Cat bearding WINS THE INTERNET

Have you seen this yet?

SparkLife

Scary movies with funny posters

These. Are. Hilarious.

Geek out!

The MindHut

Geeky Actors: Then and Now

Travel back in time!

The MindHut

Villains We Want These Actresses to Play

From super cute to super bad!

The MindHut

10 Movies Better Than Their Books

What do you think?

The MindHut

Summer Movie Open Thread

Leave your thoughts here!

The MindHut

12 Scientific Inaccuracies in Into Darkness

What did Star Trek get wrong?

The Book

Cover image

Read What You Love, Anywhere You Like

Get Our FREE NOOK Reading Apps