+ 1
what are the differences between these two arrays?
float A[20,4,6] double B[i][j][k]
3 Antworten
+ 3
Apart from the type (float for one and double for the other) the first is a one-dimentional array with 3 subscripts and the second a 3D array with i*j*k subscripts
edit: sorry I know only C and I thought I saw A[]={20,4,6}; that is a one-dimentional array with 3 subscripts.
The thing you wrote is illegal in C.
But possibly in another language is actually a one-dimensional array with 3 subscripts.
+ 1
yamila blanco
*please remove your spam
Please do not create spam threads or add spammy comments to an existing thread. Both are seen as negative behavior.
Thanks and happy coding
https://code.sololearn.com/Wv5gTHy1N6Ji/?ref=app
0
I don't know much python, but in java, the first one is wrong ,you need to to define the array as float[] A = {20, 4, 6}; , and the second one is wrong too, you need to define the array as double[][][] B = new double[i][j][k];