arrays the most basic structure for storing and accessing collection of data is the array arrays can be used to solve wide range of problems in computer science most programming languages provide this structured data type as primitive and allow for the creation of arrays with multiple dimensions in this we implement an array structure for one-dimensional array and then use it to implement two-dimensional array and the related matrix structure the array structure at the hardware levelmost computer architectures provide mechanism for creating and using one-dimensional arrays one-dimensional array as illustrated in figure is composed of multiple sequential elements stored in contiguous bytes of memory and allows for random access to the individual elements the entire contents of an array are identified by single name individual elements within the array can be accessed directly by specifying an integer subscript or index valuewhich indicates an offset from the start of the array this is similar to the mathematics notation (xi )which allows for multiple variables of the same name the difference is that programming languages typically use square brackets following the array name to specify the subscriptx[ figure sample - array consisting of elements