+ 1
Multidimensional array coding question
int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; int x = myArr[1][0]; // 4 What is the meaning of myArr[0][2] = 42? Still cannot understand after reading comment under that topic Thanks
2 odpowiedzi
+ 3
myArr[0][2] = 42 i.e assagin 42 to the third position of first array
+ 1
myArr[0][2] = 42 rewrites item on third position of first array. So basicaly it makes 42 from 3.. simple rewrite