Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
5 views1 page

DSA Assignment 2 EE1

The document is an assignment for B.Tech students in the Department of Computer Science & Engineering at Maulana Azad National Institute of Technology Bhopal. It includes problems related to memory allocation and address calculation for various types of arrays, including one-dimensional, two-dimensional, and three-dimensional arrays. Students are required to solve these problems based on given parameters such as base addresses and element sizes.

Uploaded by

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

DSA Assignment 2 EE1

The document is an assignment for B.Tech students in the Department of Computer Science & Engineering at Maulana Azad National Institute of Technology Bhopal. It includes problems related to memory allocation and address calculation for various types of arrays, including one-dimensional, two-dimensional, and three-dimensional arrays. Students are required to solve these problems based on given parameters such as base addresses and element sizes.

Uploaded by

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

मौलाना आजाद राष्ट्रीय प्रौद्योf गकी संस्थान भोपाल,

भोपाल - 462003 Maulana Azad National Institute of


Technology Bhopal, Bhopal – 462003 (An Institution of National
Importance under Ministry of Education, Govt. of India)

Department of Computer Science &


Engineering B.Tech. V Semester (EE1)
Data Structures
(CSE352) Assignment-II

1. Suppose, an array A[-15 … 64] is stored in a memory whose starting


address is 459. Assume that the word size for each element is 2. Then
obtain the following:

a) How many elements are there in the array?


b) If one word of the memory is equal to 2 bytes, then how much
memory is required to store the entire array?
c) What is the location for A[50]?

2. Consider the base address of an array A[1300....1900] as 1020 and the size of
each
element is 4 bytes in the memory. Find the address of A[1700].
3. Consider an array, arr[1………10][1...15] with base value 1000 and the size of
each
element is 4 Byte in memory. Find the address of arr[8][6] when elements
are stored as row-major order.
4. Given an array, arr[2………12][3....18] with a base address of 200 and each
element
having a size of 2 bytes in memory, find the address of arr[10][5] using column-
major order.
5. Given an array, arr[1:9, -4:1, 5:10] with a base value of 400 and the size of
each element is 2 Bytes in memory. find the address of element arr[5][-1][8]
using row-major order.
6. Consider 3-dimensional Array A[90] [30] [40] stored in a linear array in column-
major order. If the base address starts at 10. The location of A[20] [20] [30] is
.
[Assume the first element is stored at A[1][1][1] and each element takes 1 B].

You might also like