Arrays in C++
Using Arrays in C++?
Explanation
Array is a collection of elements of same type referred using a unique name. Each element of an array are stored in memory locations indexed from 0 through n number of its elements. The lowest indexed will be the first element and highest indexed the last element of an array.
Syntax:
type array_name[array size]
In the above syntax the "type" defines the data type, "array_name" defines the unique name, "array size" defines the number of elements contained in an array even if the size is not specified the C++ compiler counts the size.
Usually these are initialized before its being used and classified into three major types they are single dimensional, two dimensional, multi dimensional arrays.
Usually these are initialized before its being used and classified into three major types they are single dimensional, two dimensional, multi dimensional arrays.