For More Question Papers Visit - www.pediawikiblog.
com
Code : 9CS32
Register
Number
III Semester Diploma Examination, ApriVMay-2016
m
DATA STRUCTURBS USING C
co
Time:3Hoursl I Max. Marks : 100
Note : (i) Section *lis compulsory.
g.
(ii) Answer any two full questions each from the remaining Sections.
lo
SECTION.I
l. (a) Fill in the blanks with suitable words : 5x1=5
(i)
ib
is a pointer indirection operator.
ik
(iii) In traversal ofa binary tree, root is processed at last.
(iv) The process of function calling itself is called
w
(v) is an example of nonJinear data structure.
(b) Define data structure. Give the classification of data structures. I
ia
- II
ed
SECTION
2. (a) Explain how to declare and initialize a pointer with an example.
(b) Differentiate call-by-value and call-by-reference parameter passing methods
.p
with an example. 6
(c) Explain pointer to structure with an example. 4
w
3. (a) Write a program to find smallest of numbers using pointers. J
w
O) Define dynamic memory allocation mention its'advantages. 4
(c) Explain the functions : 6
w
(i) malloc( )
(ii) calloc( )
(iii) free( )
. with their general syntax.
lof2 [Turn over
For More Question Papers Visit - www.pediawikiblog.com
For More Question Papers Visit - www.pediawikiblog.com
eCSi!2 2 of 2 1399
4. (a) Write a program to copy contents of one file to another file. 5
(b) Explain the functions : 4
(i) fseek( )
(ii) ftell( )
with their general syntax.
m
(c) Explain different file opening modes.
co
SECTION - III
5. (a) Define stack. Explain the operations that can be performed on stack. 6
(b) Convert the following expression to its prefix and postfix forms : 4
g.
a$b*c-D+E(F+G)
(c) Write a program to find the factorial of a given number using recursion.
lo
6. (a) Write an algorithm to evaluate a postfix expression. 5
o) Explain the properties of a recursive algorithm. 5
(c)
ib
Define queue. Write its representation in C. 5
ik
7. (a) Explain the advantages of circular queue over queue with an example. 5
O) Write a note on dequeue. 5
(c)
w
Write an algorithm to insert a node at the end of a linked list. 5
SECTION - IV
ia
8. (a) Compare array implonentation and dynamic implernantations of linked list. 5
(b) List the advantages of doubly linked list over singly linked list. 5
ed
(c) Explain linked implementation of stack. 5
9. (a) Define the following :
.p
(i) Binary tree
(ii) Complete binary tree
w
(iii) Shictlybinary hee
(b) Write a recursive algorithm to traverse a binary tree in post order.
w
(c) Construct a binary search tree of the following integers :
14, 15, 4,9,7,18, 3, 5, 15, 4,20, 17, 5
w
10. (a) Define sorting. List its be,nefits. 5
O) Write an algorithm to implement bubble sort. 5
(c) Explainbinarysearching. I
-'::., .. .:
For More Question Papers Visit - www.pediawikiblog.com
i-:-.-.-