Computer Science, asked by shezaahmed5023, 1 year ago

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 Anonymous
8
hiii dear

ur answer


c arr (7 (
Answered by bandameedipravalika0
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 0.
  • Array size ranges from 0 to n-1 where n is the size of array defined.

Since, the array possess the property that it starts with index 0 , arr[6]  correctly accesses the seventh element stored under array arr.

#SPJ3

Similar questions