No.
of Printed Pages – 3 BCA-305(CP)
Roll No.
B.C.A.
THIRD SEMESTER EXAMINATION, 2016-17
DATA STRUCTURE USING 'C'
Time : 3 Hours Max. Marks : 100
Note : (i) Attempt ALL questions.
(ii) Choices are given in each question set.
1. Attempt any Four of the following questions: 5 x 4 = 20
(a) Discuss Linear and Non-linear data structures with example.
(b) What do you understand by the term Algorithm? Describe the
characteristics of an algorithm.
(c) Define String? Suppose there are two strings S1 and S2, then write
an algorithm to find out whether the string S1 exits in string S2.
(d) Explain the memory addressing schemes for the two dimensional
array with suitable example.
(e) Write a C program to print the information from each node in single
inked list.
(f) Differentiate between Array and Doubly linked list.
2. Attempt any Four of the following questions: 5 x 4 = 20
(a) Simulate a stack evaluating the following postfix expressions:
(i) abcde+*+– (ii) ab+cd*+e*
(b) Write down the applications of Stack.
(c) What is Priority queue? How can you represent a priority queue in
memory? Explain.
(d) What is Circular queue? Implement a queue with the help of doubly
linked list.
1 P.T.O.
BCA-305(CP) BCA-305(CP)
(e) Implement a Stack using circular list. (b) Show the working of DFs algorithm on the following graph:
(f) Write down the algorithm for insertion and deletion operations v1
performed on the dequeue.
v2 v3
v6
3. Attempt any Two of the following questions: 10 x 2 = 20 v5 v7
(a) A binary tree T has a nodes. The inorder and preorder traversal of T v4
v8
yield the following sequence of node:
In Order : EACKFHDBG (c) Write short notes on the following:
Pre Order : FAEKCDHGB (i) Directed graph.
Draw the tree T. (ii) Representation of graph.
(b) Show that maximum number of nodes in a binary tree of height h is
2h+1–1.
(c) Discuss the threaded binary trees. Explain its memory
representation with suitable example.
4. Attempt any Two of the following questions: 10 x 2 = 20
(a) Define Binary search tree, AVL tree and B-Tree. What are the
differences among them? Explain your answer with suitable
examples, wherever require.
(b) Write a complete 'C' program to implement binary search algorithm.
(c) Write an algorithm to implement two-way merge sort. Discuss its
efficiency.
5. Attempt any Two of the following questions: 10 x 2 = 20
(a) Write an algorithm for Bredtn first traversal of a graph and explain its
with suitable example.
2 3