Generalize formula $(6.7)$ to multidimensional arrays, and indicate what values can be stored in the symbol table and used to compute offsets. Consider the following cases:
- An array $A$ of two dimensions, in row-major form. The first dimension has indexes running from $l_{1}$ to $h_{l}$, and the second dimension has indexes from $l_{2}$ to $h_{2}$. The width of a single array element is $w.$
- The same as $(a)$, but with the array stored in column-major form.
- An array $A$ of $k$ dimensions, stored in row-major form, with elements of
- size $w$. The $j^{th}$ dimension has indexes running from $l_{j}$ to $h_{j}$.The same as $(c)$ but with the array stored in column-major form.