Arrays

Sandhya Reyya
2 min readNov 21, 2020

--

Array is a simple data structure, where it stores homogeneous data items contiguously. It is very easy to find or assign an item. The keywords used in 1-d array are

element: It is the data item stored in memory.

index: Index is the location which refers the position of an data item in an array. Index always start from 0 and ends with n-1, if there are n elements.

Array is a static data structure. Once we declare the size, we can’t change it again.

Array representation:

Operations performed on array:

i . Traverse: It prints all the data items in an array.

ii . Insert: It appends new element to the array.

iii . Deletion : It removes a data item from the array.

iv . Search : It tries to find an item in the array.

v . Update : It updates or replaces a data item in an array.

Programs on array operations:

1.C

2.Java

Advantages:

a. very easy data structure.

b. Supports multidimensional format.

Disadvantages:

It is a fixed size data structure ,where memory cannot be reallocated.

With this we ‘ll end the explanation, operations, programs ,advantages and disadvantages of 1-d array.

Let us see 2-d array concept in the next story.

Thank you

--

--

Sandhya Reyya
Sandhya Reyya

No responses yet