Array Fundamentals written by Nischal Lal Shrestha.
Image of Nischal who is author of the post.

By Nischal Lal Shrestha

On Sun 01 April 2018

Array Fundamentals

What is an Array?

An array is a Data Structure consisting of a collection of variables of the same type organized under one name.

In C/C++/Java,

int my_array[] = {1, 2, 3, 4, 5};

Here different integers are collected under one name my_array. This type of Data Structure is an array.

The array might be the most widely recognized data structure. An array is a homogenous structure. By homogeneous we mean it consists of only one type of data, called the based type. The array is also called a random-access structure because all components can be selected at random and are equally accessible.

Comments