0% found this document useful (0 votes)
44 views

DS Unit 1 Question Bank

This document contains 21 questions from previous year question papers related to the data structure course "Data Structure using 'C'" (KCS301). The questions cover topics such as: 1) the differences between malloc() and calloc() functions and reasons for using dynamic memory allocation, 2) addressing calculations for multi-dimensional arrays, 3) addressing calculations for lower triangular matrices, 4) differences between arrays and linked lists, 5) time-space trade-offs, 6) inserting nodes in single/double linked lists, 7) representing sparse matrices, 8) linked list operations, 9) merits and demerits of arrays, 10) merging sorted arrays, 11) doubly linked lists and their applications, 12) asymptotic notation

Uploaded by

jeetu soni
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)
44 views

DS Unit 1 Question Bank

This document contains 21 questions from previous year question papers related to the data structure course "Data Structure using 'C'" (KCS301). The questions cover topics such as: 1) the differences between malloc() and calloc() functions and reasons for using dynamic memory allocation, 2) addressing calculations for multi-dimensional arrays, 3) addressing calculations for lower triangular matrices, 4) differences between arrays and linked lists, 5) time-space trade-offs, 6) inserting nodes in single/double linked lists, 7) representing sparse matrices, 8) linked list operations, 9) merits and demerits of arrays, 10) merging sorted arrays, 11) doubly linked lists and their applications, 12) asymptotic notation

Uploaded by

jeetu soni
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

United Institute of Technology (284)

Naini, Prayagraj
B. Tech. 3rd Semester

Data Structure using ‘C’ (KCS301)

Assignment -1 on previous year question paper from Unit 1

1) Write at least three difference between malloc() and calloc() functions. Why do we use dynamic

memory allocation? [2015]

2) Consider a multi-dimensional Array A[90][30][40] with base address starts at 1000. Calculate the

address of A[10][20][30] in row major order and column major order. Assume the first element is stored

at A[2][2][2] and each element takes 2 byte.[2020]

3) Consider the two dimensional lower triangular matrix (LTM) of order N, Obtain the formula for address

calculation I address of row major and column major order for location LTM[j][k], if base address is BA

and space occupied by each element is w byte.[2020]

4) Differentiate Array and Linked List.[2020]

5) Define Time – Space trade-off.[2020][2017]

6) Write a C program to insert a node at K position in single linked list.[2020]

7) How can you represent a sparse matrix in memory?[2019]

8) List various operation on liked list.[2019]

9) What are merits and demerits of array?[2019][2016]

10) Given two arrays of integers in ascending order, develop an algorithm to merge these arrays to form a

third array sorted in ascending order.[2019]

11) What is doubly linked list? What are its applications? Explain how an elements can be deleted from

doubly linked list using C program.[2019][2014][2015]

12) Define the following terms in brief:[2019][2018][2017][2016]

a. Time Complexity

b. Space Complexity

Amit Kumar Tiwari(UIT, CSE Department) Page 1


c. Asymptotic Notation

d. Big O Notation

13) Differentiate between overflow and underflow condition in linked list.[2018]

14) Write a program to delete a specific element in Single linked list. Double linked list takes more space

than single linked list for storing one extra address. Under what condition, could a double linked list

more beneficial than single linked list.[2018]

15) Suppose multi dimensional arrays P and Q are declared as P(-2:2,2:22) and Q(1:8, -5:5, -10:5) stored

in column major order[2018]

a. Find length of each dimension of P and Q

b. The number of element in P and Q

c. Assume Base address (Q) =400, W=4, Find the effective indices E1, E2, E3 and address of the

element Q[3,3,3].

16) Define the term Data Structure. List some linear and non-linear data structures stating the application

area where they will be used.[2017][2016]

17) Write an algorithm to insert a node at the end in a Circular linked list. [2017] [2008]

18) what do you mean by circular linked list write functions to perform following operations:[2013][2008]

a. Creation of list of nodes.

b. insert after a specific node.

c. Delete the node at a given position.

d. Display from the beginning to end

19) Explain applications of Sparse Matrix. [2016]

20) Write at least three difference between malloc() and calloc() functions. Why do we use dynamic

memory allocation? [2015]

21) What are the parameters to judge the efficiency of an algorithm. [2012]

22) Write the merits and demerits of static and dynamic memory allocation technique [2012]

Amit Kumar Tiwari(UIT, CSE Department) Page 2

You might also like