END TERM EXAMINATION
SECOND SEMESTER (BCA) MAY-JUNE 2016
Paper Code: BCA-108
Subject: Data Structure Using C
Time: 3 Hours
Maximum Marks: 75
Note: Attempt any five questions including Q no.1 which is compulsory.
- Q1. Define the following terms: (5x5=25)
- (a) Priority Queue
- (b) Linked List
- (c) Binary tree
- (d) Selection sort
- (e) Sparse matrix
- Q2. Write a C program to perform PUSH and POP operations on a stack. (12.5)
- Q3. (a) Differentiate between linear search and Binary search. (6.5)
- (b) Write an algorithm to convert an infix expression to Post fix expression. (6)
- Q4.Write an algorithm to sort a number list using Insertion sort and provide an example to verify the algorithm. (12.5)
- Q5.(a) What do you know about B-Tree? Write the steps to create a B-Tree? (7.5)
-
(b) The following sequence gives the pre-order and inorder of the Binary Tree T:
Preorder A B D G C E H I F Inorder D G B A H E I C F Draw the diagram of the tree.
(7.5)
- Q6. Write a program to search an element using Binary search technique. (12.5)
- Q7. (a) Define Queue. In what ways a queue can be implemented? (6)
- (b) Write code for insertion and deletion in a queue. (7.5)
- Q8. Write an algorithm for inserting a node in linked list: (12.5)
- (i) At the Beginning
- (ii) At the end
- (iii) At the specified location