Arrays are collections of variables of the same type into one larger variable.
Just as in the case of structs, arrays provide a very convenient way of defining and manipulating large collections of variables. It can also be a struct or class type that you have defined. The arrayname is the name you give to the array. The second array has 1000 elements, each of which is a double. When you try to access an element with an index beyond the range, because of the way arrays are accessed in memory, you are accessing bytes in memory beyond the area of memory allocated for the array.