Advantages and disadvantages of array.

sr.no Advantages Disadvantages
1 Array represent multiple data elements of the same type using a single name. Different data type could not be stored in an array.
2 In arrays, the elements can be accessed randomly by using the index number. It has a single fixed size.
3 Array consist of contiguous memory locations therefore there is no chance of extra memory being allocated in case of arrays. Allocating more memory than the requirement leads to wastage of memory and less allocation of memory leads problem.
4 2D Array is used to represent matrices. The array is homogeneous(means only one type of value can be store in the array.
5 Using arrays, we can implement other data structure like stack, queues, linked list, trees, graphs etc. Insertion and deletion quit difficult in an arrays.