C++ Array is the collection of items stored at contiguous memory locations. The array is the series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding the index to a unique identifier.

Sometimes when writing code, we need to store a lot of data for any calculation, and for that in the usual way, we have to take that number of variables. Think once, is it logically possible if you are asked to give a summation of 10000 numbers and you have to take 10000 variable? The answer is obviously no. To overcome this situation, we have a concept Array.

C++ Array Example

C++ Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value. To declare an array, define the variable type, specify the name of the array followed by square brackets and specify the number of elements it should store.

#c++ #square brackets

C++ Array Example | Arrays in C++ Tutorial
1.30 GEEK