search
Log In
0 votes
104 views

$A$ real array $A[i, j, k]$ has index $i$ ranging from $1$ to $4$, index $j$ ranging from $0$ to $4$, and index $k$ ranging from $5$ to $10$. Reals take $8$  bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of:

  1. $A[3,4,5]$
  2. $A[1,2,7]$
  3. $A[4,3,9]$
in Compiler Design 104 views

1 Answer

1 vote

            I guess this approach might be right.

Related questions

0 votes
0 answers
1
101 views
$A$ real array $A[i, j, k]$ has index $i$ ranging from $1$ to $4$, index $j$ ranging from $0$ to $4$, and index $k$ ranging from $5$ to $10$. Reals take $8$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[3,4,5]$ $A[1,2,7]$ $A[4,3,9]$ if $A$ is stored in column-major order.
asked Sep 7, 2019 in Compiler Design Lakshman Patel RJIT 101 views
0 votes
0 answers
2
367 views
An integer array $A[i, j]$ has index $i$ ranging from $1$ to $10$ and index $j$ ranging from $1$ to $20$. Integers take $4$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[4,5]$ $A[10,8]$ $A[3,17]$ if A is stored in column-major order.
asked Sep 7, 2019 in Compiler Design Lakshman Patel RJIT 367 views
0 votes
0 answers
3
102 views
An integer array $A[i, j]$ has index $i$ ranging from $1$ to $10$ and index $j$ ranging from $1$ to $20$. Integers take $4$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[4,5]$ $A[10,8]$ $A[3,17]$
asked Sep 7, 2019 in Compiler Design Lakshman Patel RJIT 102 views
0 votes
0 answers
4
46 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: An array $A$ of two dimensions, in row-major form. The first dimension has indexes running from $l_{1}$ ... has indexes running from $l_{j}$ to $h_{j}$.The same as $(c)$ but with the array stored in column-major form.
asked Sep 7, 2019 in Compiler Design Lakshman Patel RJIT 46 views
...