Arrays

An array is a set of variables, all with the same type. An element in an array is accessed using an index. The normal form is:

type varname[size];

type is the type you want to use for the array (e.g. int)

size is the length of the array (how many elements it can contain).

In arrays, 0 is the index of the first element.

You can access values in arrays using the index of the value:

arrname[indexnum]