+ 3
How many elements does arr[4][4] contain?
Doesn't an array start counting at 0? That means the answer should be (4+1)*(4+1)=25, but the answer is 16. Why doesn't it start counting at 0? If you get a number from an array at [0][1], that is valid too, so in that case it does start counting at 0.
5 ответов
+ 17
4*4
arr[4] means it contains 4 elements (0,1,2,3).....
+ 6
number of elements is 4*4=16 , y because number of rows in arr is 4 and columns is 4 but are indexing is from 0 to 3 ,array indexing starts with 0 that is predefined we can't change
+ 4
It starts counting from 0 but ends at 3.So it is 4 * 4 =16
+ 2
Ah, of course. Does start counting at 0, but stops at 3. Thanks!