2,026 views
2 votes
2 votes
Consider a lower triangular Matrix A[-25....+25, -25....+25], base address (BA)=0, size of element = 100 Byte. Find the location of a [-20][-21] (Ordering: Row Major)?

1 Answer

2 votes
2 votes
$a[-25....+25][-25....+25]$

$BA=0$

$Size\ of\ element=100\ B$

$Loc[-20][-21]$

$\\ =\left \{\underbrace {-20+25=5}+(-21+25) \right \}\times 100$

       $Natural\ \#\ sum\\ of\ 5\ rows$

$=\left \{ \dfrac{5\times 6}{2}\ +\ 4 \right \}\times 100$

$=\left \{ 15+4 \right \}\times 100$

$=1900$

Related questions

0 votes
0 votes
1 answer
1
Lakshman Bhaiya asked Oct 22, 2018
3,133 views
A is a 2D-array with the range [-5....5,3......13] of elements.The starting location is 100. each element accupies 2 memeory cells.Calculate the location of A[0][8] using...
2 votes
2 votes
1 answer
3
shikharV asked Nov 16, 2015
2,320 views
Please solve the above problem. Given answer: D
2 votes
2 votes
3 answers
4
Nitesh_Yadav asked Jul 2, 2022
1,983 views
An array VAL[1..15][1..10] is stored in the memory with each element requiring 4 bytes of storage. If the base address of array VAL is 1500, determine the location of VAL...