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
Illustrate Trivariate Colour Models Conventional colour models based on the tristimulus theory all contain three variables and so are called trivariate models. Let us now consi

implementation of fast fourier transforms for non power of 2

Operation of Algorithm The following sequence of diagrams shows the operation of Dijkstra's Algorithm. The bold vertices show the vertex to which shortest path has been find ou

What data structure would you mostly likely see in a nonrecursive execution of a recursive algorithm? Stack

Describe an algorithm to play the Game of Nim using all of the three tools (pseudocode, flowchart, hierarchy chart)

Q. Which are the two standard ways of traversing a graph?  Explain them with an example of each.  Ans:   T he two ways of traversing a graph are written below

Write a program that uses the radix sort to sort 1000 random digits. Print the data before and after the sort. Each sort bucket should be a linked list. At the end of the sort, the

hello, i need help in data mining assignment using sas em and crisp-dm

Q. What do you mean by the best case complexity of quick sort and outline why it is so. How would its worst case behaviour arise?

Define the Internal Path Length The Internal Path Length I of an extended binary tree is explained as the sum of the lengths of the paths taken over all internal nodes- from th