There are a ton of different types of data structures!


Think of an array as a road. On this road you can different addresses to houses along the way. These addresses are places of memory, and the houses are objects on this road.  

Each of these objects can be identified by the index of the array. There are many different ways to index an array but the most standard is the zero based array.


Advantages to using arrays:

  • Since indexing is used you can access any point in the array to get that information. For instance if we were going back to the road analogy, you can use google maps to find the place instantly based on the address. In this case instead of the physical memory address we access through the index.


Here is an example of an array:

char arr[] = {‘h’, ‘e’, ‘l’, ‘l’, ‘o’};

arr = [‘h’, ‘e’, ‘l’, ‘l’, ‘o’]