Question

Assume an array descriptor has the format:           type ArrayDescriptor =                record       &nbs

Assume an array descriptor has the format:

          type ArrayDescriptor =

               record

               VirtualOrigin: integer; Multiplier1, Multiplier2: integer;

               LowerBound1, UpperBound1, LowerBound2, UpperBound2: integer

          end;

so that when row-major order is used, the storage mapping function for an array a is:

location(a[i,j]) = VirtualOrigin + i*Multiplier1 + j*Multiplier2.

For each of the following 6 cases, assume that the first word of storage allocated is decimal location 4000. Give (a) the number of words of storage required for the array; (b) the array’s descriptor; and (c) the location of M[2,3] in each declared array. Assume that each R requires one word and that each S requires two words.

(1) var M: array [1..3, 1..3] of R

(2) var M: array [0..3, 0..4] of R

(3) var M: array [-1..2, 2..4] of R

(4) var M: array [1..3, 1..3] of S

(5) var M: array [0..3, 0..4] of S

(6) var M: array [-1..2, 2..4] of S

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer The giveguesto belongs t to o dimensio n ovdey usiny e tomulae ere ss ChỉJ : base addess+ ele sive base addveis eHooom Ca

Add a comment
Know the answer?
Add Answer to:
Assume an array descriptor has the format:           type ArrayDescriptor =                record       &nbs
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT