In computer programming, what is an array?


An array is a variable that acts like a block of data and stores different values, usually integers, in a grid-like system. The grid is a virtual representation of rows and columns with each cell containing a separate value. Many computer languages use arrays as a variable to store different types of data.

An array holds a fixed number of rows and columns, and each stored value must be of the same data type, such as integer, float, char, or string. A one-dimensional array is a single row of data and can look like (1,2,3,4,5,6) or even (carrot, potato, tomato, eggplant, bell pepper, broccoli). The number of values within the array is two or higher.

A two-dimensional array has at least two rows and two columns and would look like "(1,2,3,4,5,6),(7,8,9,10,11,12)" or "(cat, dog, cow), (bird, rat, mouse)" though each would be implemented differently in different programming languages.

1 Additional Answer Answer for: what does array mean
to place in proper or desired order; marshal: Napoleon arrayed his troops for battle.
to clothe with garments, especially of an ornamental kind; dress up; deck out: She arrayed herself in furs and diamonds.
order or arrangement, as of troops drawn up for battle.
military force, especially a body of troops.
a large and impressive grouping or organization of things: He couldn't dismiss the array of facts.
More Definitions
Fewer Definitions
About -  Privacy -  Careers -  Ask Blog -  Mobile -  Help -  Feedback  -  Sitemap  © 2015