Computer Science, asked by Shereen5335, 1 year ago

An array A[30][10] is stored in the memory with each element requiring 4 bytes of storage ,if the base address of A is 4500 ,Find out memory locations of A[12][8], if the content is stored along the row.

Answers

Answered by Sidyandex
5

We know, the array A [30][10] is stored in the memory with each element taking 4 bytes of storage space.

The base address is 4500.

Therefore, the memory locations for A [12][8] is

Loc of A [12] [8] = B+W*(N*(I-LBR) + (J-LBC))

=4500+4*(10*12+8)

= 4500 4*(128)

=4500 + 512

= 5012.

The array is the collection of data that is structured consisting of elements that are identified by a key or index.

Similar questions