Formats for Storing Variables in Memory
• Array Variables
For one-dimensional arrays
+ 0
A (0)
A (1)
A (2)
A (n)
+ n
For two-dimensional arrays
+ 0
B (0, 0)
B (0, 1)
B (0, 2)
B (x, y)
+ n
276
• As an element of the array, each variable is stored
in memory in order.
• For multi-dimensional arrays, the rightmost sub-
script is stored in memory, in the order of alteration.
Appendix D