Calculate address of an element in an array., Data Structure & Algorithms

Q. Explain the technique to calculate the address of an element in an array. A 25 × 4 matrix array DATA is stored in memory in 'row-major order'. If base address is 200 and ω = 4 words per memory of the cell.  Calculate the DATA address [12, 3]                                                                                     


In a row major representation, address of any element a[i][j] can be found using the formula written below: a[i][j]=base(a)+(i*m+j)*size where base(a) is base address, m is the number of columns and size represent size of word.










Posted Date: 7/10/2012 5:21:13 AM | Location : United States

Related Discussions:- Calculate address of an element in an array., Assignment Help, Ask Question on Calculate address of an element in an array., Get Answer, Expert's Help, Calculate address of an element in an array. Discussions

Write discussion on Calculate address of an element in an array.
Your posts are moderated
Related Questions
Arrays :- To execute a stack we need a variable called top, that holds the index of the top element of stack and an array to hold the part of the stack.

How to create an General Tree and how to search general tree?

Q. Write down an algorithm to merge the two sorted arrays into the third array. Do  not perform the sort function in the third array.                           Ans: void m

The searching technique that takes O (1) time to find a data is    Hashing is used to find a data

Determine about the logic gates Many electronic circuits operate using binary logic gates. Logic gates essentially process signals that represent true or false or equivalent i.

Write an algorithm to add an element at the end of circular linked list.   Algorithm to Add the Element at the End of Circular Linked List. IINSENDCLL( INFO, LINK, START, A

Unlike a binary-tree, each node of a B-tree may have a number of keys and children. The keys are stored or saved in non-decreasing order. Each key has an related child that is the

Question 1 Write the different characteristics of an algorithm Question 2 Explain in brief the asymptotic notations Question 3 Write an algorithm of insertion sort and e

Circular Queues:- A more efficient queue representation is get by regarding the array Q(1:n) as circular. It becomes more convenient to declare the array as Q(O: n-1), when  re

There are ten stations on a railway line: Train travels in both directions (i.e. from 1 to 10 and then from 10 to 1).  Fare between each station is $2. A passenger input