Consider the following declaration of an array in ‘C’ language:
int A[6] = {1, 2, 3, 5};
Which of the following statements is true?Concept:
An array is a data structure that contains a group of elements. These elements are all of the same data type, such as an integer.
To access element from an array subscript(index) and array name is required
Explanation:
Array name: A
|
index |
0 |
1 |
2 |
3 |
|
element |
1 |
2 |
3 |
5 |
To access 3rd element in an array A[2] or 2[A] is used. Therefore Both A[2] and 2[A] represent the value 3
Important point:
A[0] represent the value 1st element


