search
Log In
0 votes
117 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]$

 if $A$ is stored in column-major order. 

in Compiler Design 117 views

Please log in or register to answer this question.

Related questions

0 votes
1 answer
1
115 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]$
asked Sep 7, 2019 in Compiler Design Lakshman Patel RJIT 115 views
0 votes
0 answers
2
395 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 395 views
0 votes
0 answers
3
112 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 112 views
0 votes
0 answers
4
57 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 57 views
...