In this article we will be going to discuss about advantage of an array and disadvantage of an arrays.
Advantage of an Array in C:
1. With the help of an array we can store different variable of same datatype in single variable.
2. With the help of an array we can represent list of an element using single variable.
3. An array is also used in sorting of an element.
4. An arrays are used to implement of other data structure such as stack and queue etc.
5. An arrays are also used in solving the matrix problem.
Disadvantage of an Array in C:
1. The prior knowledge of number of element in linear array (one-dimensional array) is necessary.
2. Arrays are static structure, static in the sense that memory allocate during compilation time that can't be reduced and expand at run time.
3. The insertion and deletion process in arrays are time consuming.
Conclusion:
Hey! student in this article we have learned about advantage of an array and disadvantage of an array, i hope after reading this article you have no any doubt remaining but still if you have any doubt then feel free ask in comment section.
