0% found this document useful (0 votes)
71 views2 pages

Address Calculation Assignment

Computer

Uploaded by

Azal Azami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views2 pages

Address Calculation Assignment

Computer

Uploaded by

Azal Azami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

St Paul’s Church College, Agra

Session: (2023-24)
Class – XII
Subject : COMPUTERS SCIENCE

ASSIGNMENT

(related to ADDRESS CALCULATION)


1. Each element of a matrix A[-15…20,20…45] requires 4 bytes of storage.
Find the address of A[30][20], if base address is 1000 and the matrix is
stored
a. Row major wise
b. Column major wise

2. A character array B[7][6] has a base address 1046. Calculate the address at
B[2][3], if the array is stored
a. Row major wise
b. Column major wise

3. A matrix B[10][7] is stored in memory with each element requires 2 bytes


of storage. If the base address at B[x][1] is 1012 and the address at B[7][3]
is 1060.Determine the value of ‘x’, when the matrix is stored in Column
Major Wise.

4. The array D[-2….10][3….8] contains double type elements ., if the base


address is 4110, find the address of D[4][5] , when the array is stored
Column major wise.

1
5. An array Ar[-4…6][-2….12] stores elements in row major wise, with the
address Ar[2][3] as 4142. If each element requires 2 bytes of storage, find
the base address.

6. Mat is a matrix created with 6 rows and 7 columns. Each element of matrix
occupies 2 bytes in the memory. If the base address of Mat[1][1] is 1500,
then find the address of Mat[4][2] when the matrix is stored as:
a. Row major wise
b. Column major wise

7. M[10….1500] is an array of fractional numbers needs 4 bytes of storage for


each element. Find out total memory required to store this array.

8. A matrix B[15][10] is stored in the memory with each element requires 4


bytes of storage. If the base address at B[1][Y] is 716 and the address at
B[8][5] is 1000. Determine the value of ‘y’ when the matrix is stored in
Row major wise.

9. A square matrix A[m x m] is stored in the memory with each element


requiring 2 bytes of storage. If the base address at A[1][1] is 1098 and
address of A[4][5] is 1144, determine the order of matrix A[m x m] when
the matrix is arranged Column major wise.

10.Let A[1…N] is one dimensional array whose base address is 2000 and the
array is stored sequentially in the memory. The address of last element of
array is 3000. Each element of the array requires 4 bytes of storage, find
the upper bond (higher limit) of the array A[ ].

You might also like