There are two methods of storing arrays, row-wise and column-wise. Row-wise
storage means that the elements are stored a row at a time starting from a base
address and increasing towards high memory. Arrays stored column-wise have the
elements stored a column at a time increasing towards high memory.
For example, consider the array consisting of 10 rows and 20 columns. The
appropriate declarations in each language would be:
The various language standards define Fortran as using column-wise storage,
whilst C/C++ stores arrays row-wise. Therefore, a Fortran array defined as
numbers(10,20), would have the equivalent C/C++ declaration numbers. In
Fortran by default the elements are actually numbered from one whilst in C/C++
they are numbered from zero.