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
how to write a function of area of a circle using python

how to creat atm project by using linked list?

Define about the class invariant A class invariant may not be true during execution of a public operation though it should be true between executions of public operations. For

1. Write a pseudocode algorithm to print the numbers from 1 to 10, and then from 10 to 1, using exactly one loop. 2. The function contains() takes a food as an argument and tell


Write the algorithm for compound interest

advanatges of dynamic data structure in programming

(a) Explain the term Group Support System and elaborate on how it can improve groupwork. (b) Briefly explain three advantages of simulation. (c) Explain with the help of a

implement multiple stack in one dimensional array

two standards ways of traversing a graph in data structure