+ 2
[Ansured] Definition problem
I'm assigned to make an 4x4 array. What do you think, is it this array int arr[][] = new int{{1,2,4,8}, {1, 3, 5, 7}, {* 4 values*}, {*4 values*}} or a wild array like int arr[][][][] = new int{{{{}}}} --each dimension has another dimension, which has another, which in its turn has another etc etc etc ?
1 ответ
+ 10
This is a 4x4 array:
int arr[][] = new int{{1,2,4,8}, {1, 3, 5, 7}, {* 4 values*}, {*4 values*}}
This is a 4d array:
int arr[][][][] = new int[1][1][2][3];