Computer Science, asked by arfas485, 7 months ago

Each element of an array arr 15 20 requies w bytes of storage if the address of arr 6 8 is 4440 and the base address at arr 1 1 is 4000 find the width w of each cell in the array arr[ ] [ ] when the array is stored as column major vise

Answers

Answered by mamtasingh215rajput
0

Answer:

Raw major Implation

lJth element in row major B+W(C(I-L)+T(C)

Answered by aburaihana123
2

The width w of each cell in the array arr[ ] [ ] when the array is stored as column major vise is 4 bytes

Explanation:

Given:

Element of an arr 15 ,16

Address of arr 6 8 is 4440

Base address at arr 11 = 4000

To find: Width of an each cell in the array

Solution:

i =6

j =8

B=4000

m = 15

L_{c}  = 1

L_{r} =1

W = ?

Add[i][j] = 4440

Column wise,

Add[i][j] = B + W[_{m} (j - L_{c} ) + (I - L_{r} )]

4440 = 4000 + W[15(8 - 1) + (6 - 1)]

4440 - 4000 = W(15 × 7 +5)

440 = W(105 + 5)

440 = W (110)

W = 440/110

W = 4 bytes

Final answer:

The width w of each cell in the array arr[ ] [ ] when the array is stored as column major vise is 4 bytes

#SPJ3

Similar questions