For the purposes of this task, the actual memory layout or access method of this data structure is not mandated.

It is enough to:

 State the number and extent of each index to the array.
 Provide specific, ordered, integer indices for all dimensions of the array together with a new value to update the indexed value.
 Provide specific, ordered, numeric indices for all dimensions of the array to obtain the arrays value at that indexed position.


Task

 State if the language supports multi-dimensional arrays in its syntax and usual implementation.
 State whether the language uses row-major or column major order for multi-dimensional array storage, or any other relevant kind of storage.
 Show how to create a four dimensional array in your language and set, access, set to another value; and access the new value of an integer-indexed item of the array.
 The idiomatic method for the language is preferred.
 The array should allow a range of five, four, three and two (or two three four five if convenient), in each of the indices, in order. (For example, if indexing starts at zero for the first index then a range of 0..4 inclusive would suffice).
 State if memory allocation is optimised for the array - especially if contiguous memory is likely to be allocated.
 If the language has exceptional native multi-dimensional array support such as optional bounds checking, reshaping, or being able to state both the lower and upper bounds of index ranges, then this is the task to mention them.


Show all output here, (but you may judiciously use ellipses to shorten repetitive output text).




/*Single dimensional array of integers*/
int a[10];
 
/*2-dimensional array, also called matrix of floating point numbers.
This matrix has 3 rows and 2 columns.*/
 
float b[3][2];
 
/*3-dimensional array ( Cube ? Cuboid ? Lattice ?) of characters*/
 
char c[4][5][6];
 
/*4-dimensional array (Hypercube ?) of doubles*/
 
double d[6][7][8][9];
 
/*Note that the right most number in the [] is required, all the others may be omitted.
Thus this is ok : */
 
int e[][3];
 
/*But this is not*/
 
float f[5][4][];
 
/*But why bother with all those numbers ? You can also write :*/
int *g;
 
/*And for a matrix*/
float **h;
 
/*or if you want to show off*/
double **i[];
 
/*you get the idea*/
 
char **j[][5];