what is array in DS & program of array


              Ø  Array –
·         An array is a way of storing several items.
·         Array is linear type of data structure.
·         Definition array is a set of similar type of (homogeneous) data.
·         An array holds the element that has same data type.
·         Array elements are stored in subsequent memory location.
·         Two dimensional arrays are stored row by row in subsequent memory location.
·         Array size should be mentioned in declaration it size is constant not a variable.
·         The arrangement in an array in a systematic order as a sequential.
·         An array stored in a systematic order it given and sequential index.
·         Array index start with zero.
·         Each array element can be accessed by its index.
·         Following are the important term to understand the concept of array-
                                                         i.            Element – each item stored in an array is called element.
                                                        ii.            Index − Each location of an element in an array has a numerical index, which is
used to identify the element.
Array representation -Arrays can be declared in various ways in different languages.





As per the above illustration, following are the important points to be considered.
Index starts with 0.
Array length is 8 which mean it can store 8 elements.
Each element can be accessed via its index.

Basic operations –
Following are the basic operations supported by an array.
Traverse – traverse means Prints all the array elements one by one (from 0 index to n index).
Insertion –insertion means insert and adds an element at the given index.
Deletion –deletion means remove and deletes an element at the given index.
Search – Searches mean find an element in array.
Update − Updates an element at the given index.