written 8.7 years ago by |
Fundamentals of Data Structures - May 2015
Information Technology Engineering (Semester 3)
TOTAL MARKS: 100
TOTAL TIME: 3 HOURS
(1) Question 1 is compulsory.
(2) Attempt any four from the remaining questions.
(3) Assume data wherever required.
(4) Figures to the right indicate full marks.
Answer any one question from Q1 and Q2
1 (a) Explain various bitwise operators in C. Give example of each operator.(4 marks) 1 (b) Illustrate the difference between Union and Structure with suitable example.(4 marks) 1 (c) Write a C program to swap two numbers using call by reference.(4 marks) 2 (a) What is pointer variable ? Explain declaration, initialization and accessing a pointer variable with an example.(4 marks) 2 (b) Explain arrays with example.(4 marks) 2 (c) Explain if and switch-case decision control statement.(4 marks)
Answer any one question from Q3 and Q4
3 (a) Define the following terms with example:
(i) Data object
(ii) Data structure
(iii) Data type(6 marks)
3 (b) Sort the following and show the status of every pass using selection sort 34, 9, 78, 65, 12, -5.(6 marks)
4 (a) Compare linear and non-linear, static and dynamic, primitive and non-primitive data structure.(6 marks)
4 (b) Sort the following data to ascending order using quick sort. Show all passes with pivot : 17, 8, -9, 2, 0, -5, 7, 20, 11, 15.(6 marks)
Answer any one question from Q5 and Q6
5 (a) Define polynomial. Represent the following polynomial using array:
i) x3+x2+x+16
ii) x5y4+x3y3+x2+y2+10(7 marks)
5 (b) Explain simple and fast transpose of a spare matrix with example.(6 marks)
6 (a) Explain sequential memory organization with example.(6 marks)
6 (b) Explain the two-dimensional array in detail with column and row major representation and address calculation in both the cases.(7 marks)
Answer any one question from Q7 and Q8
7 (a) What are the advantages of linked list over array ? Describe
different types of linked list.(7 marks)
7 (b) Write a C function to perform the following operation on SLL:
i) Insert element at any position
(ii) Reverse the list without using any DS.(6 marks)
8 (a) Write C function to delete any node in case of DLL.(6 marks)
8 (b) Explain the concept of GLL and represent the following
GLL:
(i) ((a, b), (c, d), e)
(ii) (a, (b, c), d)(7 marks)