179k views
2 votes
To access an array element, use the array name and the element's ________.

A) data type
B) subscript
C) name
D) value
E) None of these

User MarioDS
by
7.8k points

1 Answer

7 votes

Final answer:

To access an array element, use the array name and the element's subscript.

Step-by-step explanation:

To access an array element, you use the array name and the element's subscript.

A subscript is an index that represents the position of an element within an array. It is typically enclosed in square brackets [] after the array name. For example, if we have an array called numbers and we want to access the element at index 2, we would write numbers[2].

User GirishK
by
7.4k points