what is array in C++
Answers
Answered by
1
Her friend,
here is your answer,
An array is a data structure which allows a collective name to be given to a group of elements which all have the same type. An individual element of an array is identified by its own unique index (or subscript). An arraycan be thought of as a collection of numbered boxes each containing one data item.
Hope helps you and mark as brainliest if my answer is useful to you
here is your answer,
An array is a data structure which allows a collective name to be given to a group of elements which all have the same type. An individual element of an array is identified by its own unique index (or subscript). An arraycan be thought of as a collection of numbered boxes each containing one data item.
Hope helps you and mark as brainliest if my answer is useful to you
Answered by
4
An array is a collection of finite data elements of the same type .
EXPLANATION :
⏩ The array variable is the name given to the array . Say for example :
int a[5] ;
Here a is the array variable .
⏩ Array size is the number of data elements present in the array .
Here there are 5 elements in the array .
⏩ Array index is the position of a particular element in the array .
⏩ An array always starts counting from 0 and hence the 2 nd element present in an array a[] will be a[1] and not a[2] .
⏩ int b[3] = {1,2,3} ;
⏩ The elements are :
b[0] = 1
b[1] = 2
b[2] = 3
⏩ Hence the array elements can be accessed by putting their index value .
Similar questions