Key Concepts

Review core concepts you need to learn to master this subject

Arrays: Lesson
Lesson 1 of 2
  1. 1
    An array is a grouping of variables of the same type into contiguous blocks of memory. This data structure is especially useful in applications when there are many variables of the same type that…
  2. 2
    An array is a collection of data that can be of any type. For example, you can construct an array of ints, bools, chars, etc. There are two types of arrays that can be created: an initialized arr…
  3. 3
    Array elements can be accessed, modified, and used just like any other variable of the same data type. The following shows how to access an element in an array at index idx: > arr[idx] The first …
  4. 4
    The main benefit of arrays is the ability to work with large amounts of data without assigning each piece of data its own variable name; therefore arrays usually contain many elements. To work with…
  5. 5
    Up to now, when looping through an array, the size of the array has been hardcoded into the loop condition. This is bad practice as it makes the loop only applicable to arrays of a single size. To …
  6. 6
    As we said before, arrays can contain any kind of data type, be it int, char, or anything else. Interestingly, arrays can also store other arrays! An array containing other arrays is known as a *mu…
  7. 7
    Elements in a multidimensional array are accessed in like so: > array[rowNumber - 1][columnNumber - 1]; Similar to their single dimension counterparts, the first row is at index 0, the nth row …
  8. 8
    Good Job! You have just completed the lesson on arrays, probably the most used data structure in software development. Here is a quick recap of everything: * Arrays are a special data type that al…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo