0
Can someone help me I dont understand [0][2]
9 Respuestas
+ 1
arrays are zero based meaning they begin with 0 instead of 1. goto your lessons and look for array and goto the bottom itll explain.
+ 1
this means the element of1 row and 3 column in array
+ 1
Imagine this:
[ ][ ][x][ ][ ][ ][ ][ ][ ][ ][ ][ ]...
[ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]...
[ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]...
[ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]...
[ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]...
[0][2] is the x. It's a matrix. The first integer is the lines and the other is the columns.
0
it is a two dimensional array where subscripts [][] denoting rows and columns so [0][2] means 0 row's 2 element something like
[0]=[0][1][2] here third one that is two is your element
0
I understand except idk where 42 came from
0
42 is its value and 2 as its index
0
Two indexes [] [] indicate multidimensional arrays
0
int res=0;
f o r (int el : arr)
res + = e l
0
Can someone help me i dont understand [1][0]