Skip to main content

Posts

Showing posts with the label The Crazy Programmer Advantages and Disadvantages of Array Advantages and Disadvantages of Array The Crazy Programmer

Advantages and Disadvantages of Array Nitish Agarwal The Crazy Programmer

In this article, we will take a look at the advantages and disadvantages of one of the most basic data structures in programming – Arrays. But before that, let us have a brief understanding of what arrays are. An array is one of the most popular data structures in various programming languages like C, C++, Java, etc. It is used to store data in contiguous memory locations. Whenever we deal with an ordered set of data, arrays are the first and foremost choice to store this data. It can be used to store data of different data types like integer, float, char, double, etc, but a single array contains data of only a single data type. The values stored in arrays are identified by their indexes which generally starts from zero, i.e, the first element of an array will have index zero, the second element will have index one, and so on. These arrays are of great use while executing lengthy programs, but they have certain advantages and disadvantages too. In the above representation, note that