The Gateway to Computer Science Excellence
0 votes
9 views

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:

  1.  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.$
  2.  The same as $(a)$, but with the array stored in column-major form.
  3. An array $A$ of $k$ dimensions, stored in row-major form, with elements of
  4. 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.
in Compiler Design by Veteran (54.8k points) | 9 views

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,492 answers
195,439 comments
100,705 users