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 I can easily implement the bubble,selection,linear,binary searth algorithms?

A binary search tree (BST), which may sometimes also be named a sorted or ordered binary tree, is an edge based binary tree data structure which has the following functionalities:

#question bubble sort..

State the Introduction to pseudocode No specific programming language is referred to; development of algorithms by using pseudocode uses generic descriptions of branching, loop

Q. Make the 11 item hash table resulting from hashing the given keys: 12, 44, 13, 88, 23, 94, 11, 39, 20, 16 and 5 by making use of the hash function h(i) = (2i+5) mod 11.

A  BST is traversed in the following order recursively: Right, root, left e output sequence will be in In Descending order

what are the charaterstics to determine weather an algorithm is good or not? explain in detail

Linked lists are among the most common and easiest data structures. They may be used to implement various other common abstract data types, including queues, stacks, symbolic expre

How to create multiple queue on single array?

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