My 2 Cents Arrays In C++

Swati Mishra

Content Writer
An array is the collection of elements of single data type that is stored in adjacent memory locations. If we take the example for the array then it is defining 20 integer variables for storing the score of 20 students in class, one integer array can be defined containing the 20 elements to store data.
Syntax

<data_type> <variable_name>[<dimension_size>]

Example

Int arr [20];
 

Prasoon Arora

White Belt
An array is defined as a kind of data structure which is used to store a given or fixed define size of mentioned elements in a sequential manner belonging to same type. The array can be further described as mentioned below :

The figure shows the array to store 10 elements ranging from 0 to 9.
 
Top