Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements?
A.arr[6]
B.arr[7]
C.arr{6}
D.arr{7}
Answers
Answered by
8
hiii dear
ur answer
c arr (7 (
ur answer
c arr (7 (
Answered by
1
Answer:
Concept:
Array is a linear datastructure that stores homogeneous data items.
Explanation:
- Simply said, an array is a grouping of related data types kept in close proximity to one another in memory. It is capable of storing basic data types as int, char, float, double, etc. A programmer can simply access the elements with the aid of arrays.
The following are the important features of array:
- A variable that can hold a fixed-size group of the same data type items is called an array.
- An array's elements can be randomly accessed. You can also figure out what each element's address in an array is.
- Array components kept in adjacent memory regions.
- An array index starts with index .
- Array size ranges from to where n is the size of array defined.
Since, the array possess the property that it starts with index , arr[6] correctly accesses the seventh element stored under array arr.
#SPJ3
Similar questions
Social Sciences,
7 months ago
Science,
7 months ago
Math,
7 months ago
Computer Science,
1 year ago
Science,
1 year ago
English,
1 year ago
Math,
1 year ago