If an array is decleared as arr[]={1,3,5,7,9};then what is the value of sizeof (arr{3})
Answers
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