Row major storage, Data Structure & Algorithms

Q. Take an array A[20, 10] of your own. Suppose 4 words per memory cell and the base address of array A is 100. Find the address of A[11, 5] supposed row major storage.                          

Ans.

A[20, 10]

W = 4 words

Base (A) = 100

A [11, 5] → in row major m x n

loc [ a [i] [j] = base (a) + w [n [i - lbr] + ( j - lbc)]

= 100 + 4 [10 (11) + 5]

= 100 + 4[110+5]

=100 + 115 *4

= 560

 

 

Posted Date: 7/13/2012 2:03:54 AM | Location : United States







Related Discussions:- Row major storage, Assignment Help, Ask Question on Row major storage, Get Answer, Expert's Help, Row major storage Discussions

Write discussion on Row major storage
Your posts are moderated
Related Questions
c++ To calculate the amount to be paid by a customer buying yummy cupcakes for his birth day party

a) Run your program for α = 0.05, 0.5, and 0.95. You can use n = 30, and W = 10. What is impact of increasing value of α on connectivity of G'? To answer this question, for each v

What are circular queues?  Circular queue: Static queues have a very large drawback that once the queue is FULL, even though we erase few elements from the "front" and relieve

AVL trees are applied into the given situations: There are few insertion & deletion operations Short search time is required Input data is sorted or nearly sorted

How branching takes place in Instruction pipeline. Explain with suitable examples

Explain in brief about the Container An entity which holds finitely many other entities. Just as containers such as boxes, baskets, bags, pails, cans, drawers, and so for

As part of an experiment, a school measured heights (in metres) of all its 500 students. Write an algorithm, using a flowchart that inputs the heights of all 500 students and ou

Illumination of wire frame The colour or shade that a surface appears to the human eye depends primarily on three  factors : Colour and strength of incoming illumination

By taking an appropriate example explain how a general tree can be represented as a Binary Tree.                                                                    C onversio

Ask question #Minima binary search tree is used to locate the number 43 which of the following probe sequences are possible and which are not? explainum 100 words accepted#