Array (from programmer’s view) - “a consecutive set of memory locations” or in details, Array is -
So, being an ADT we will be more concerned with the operations that can be performed on an array. The array is useful for storing thousands of values in it and we access the values through the index. Usually, arrays are of fixed size.
Need of using Array
The efficiency of a computer lies in processing tens of thousands of data within a blink of an eye. Though we often start our programming journey with small example programs like -
Find minimum or maximum from given any two or three values.
Swap two values etc.
Having two or three variables may suffice in the above cases but for a large number of values, it is simply not possible. Arrays serve this purpose efficiently.
Types of Arrays
We can categorize into two -
One-dimensional array – sequence of finite homogeneous elements.
Multi-dimensional array – each element is an array of elements of a similar type. Here we discuss only two and three-dimensional arrays.
Properties of an array
In this site, we are providing some standard array programs. For any demand of new program please mail us.
Enjoy all programs related to array: