Computer Science, asked by vivekanandvaidy4788, 1 year ago

If an array is decleared as arr[]={1,3,5,7,9};then what is the value of sizeof (arr{3})


nishantkumartip8lm93: question is not clear plz write it simly ac much u can to make me understand
nishantkumartip8lm93: well arr{3} will access 7

Answers

Answered by nishantkumartip8lm93
7
well arr{3} will access 7
Answered by nafibarli789
0

Answer:

Array indices begin with 0, thus the first element has index 0, the second has index 1, and so on. So the value of arr[3] exists 7.

Explanation:

Declaration of an array

The array exists called and the variety of its components is determined in an "array declaration." It can also furnish the array's size in terms of elements. A variable having an array type exists regarded as a pointer to the array components' type.

Accessing an array element exists the identical to indexing an array. The index number of an array element can be utilized to access it. NumPy array indices start with 0, therefore the first element includes index 0, the second holds index 1, and so on.

  • If an array exists declared as arr[]={1,3,5,7,9};
  • value of arr[0] is 1
  • value of arr[1] is 3
  • value of arr[2] is 5
  • value of arr[3] is 7
  • value of arr[4] is 9

Hence, Array indices begin with 0, thus the first element has index 0, the second has index 1, and so on. So the value of arr[3] exists 7.

#SPJ3

Similar questions