Data Structure Question Bank
Data Structure Question Bank
of Printed Pages : 2
41223/B230
!41223B230! Reg. No.
SECTION - A
(d) What are primitive and non-primitive data structures ? Give examples.
(h) Differentiate between singly linked list and doubly linked list.
P.T.O.
41223/B230 2
SECTION - B
Answer any four questions : 4x5=20
2. Write a program in C to print sum of array elements using Dynamic Memory Allocation.
5. A circular queue, the size which is 5 has 3 elements, 40, 86, 31 where f=2 and r=4.
After inserting 20 and 65, what is the value of f and r ? Trying to insert an element 70
at this stage, what will happen ? Delete 2 elements from queue and insert 25. Now
what is the value of f and r ?
SECTION - C
Answer any four questions. 4x10=40
7. What is Dynamic Memory Allocation ? Explain DMA functions.
5+5
11. Write short notes on any two :
(i) Pointer and structures.
(ii) Components of linked list.
(iii) File I/O functions.
-oOo-
!41223B230!
No. of Printed Pages : 2
32224/B240
!32224B240! Reg. No.
PART - A
P.T.O.
32224/B240 2
PART - B
Answer any four of the following : 4x5=20
2. Write a program to implement the working of a simple queue.
PART - C
Answer any four of the following :
4x10=40
8. (a) Differentiate between malloc ( ) and calloc ( ).
5
(b) Explain five file I/O functions
5
-oOo-
!32224B240!
*32224240* 32224/B 240
Reg. No.
SECTION – A
SECTION – B
SECTION – C
8. Write a program in C to create a file and display its contents in proper format
using following fields – Book_id, Book_name, Author and Price_of_book. 10
SECTION – A
SECTION – B
P.T.O.
22224/B 320 -2- *22224B320*
14) Draw the binary search tree for the following elements.
16 4 15 12 7 36 10 2
17) Write the insert and delete functions for a regular queue.
SECTION – C
21) W.A.P. to create a file and display its contents in proper format using
following fields Book_id, Book_name, Author and Price_of_book.
25) Explain the following :
a) Doubly linked list
b) File error handling functions.
_____________
*22224B320* 22224/B 320
Reg. No.
SECTION A
P.T.O.
22224/B 320 *22224B320*
SECTION B
13. What is static memory allocation ? State the advantages of dynamic memory
allocation over static memory allocation.
16. Define file. Explain any 5 access mode for opening a file.
18. Write the sort elements in ascending order using selection sort.
SECTION C
22. Apply bubble sort technique and sort the following numbers in ascending order.
67 22 42 90 54 46 32
24. Define queue. Explain the working of circular queue with an example.
25. Construct the binary search tree with the following data.
14 11 36 37 7 8 4
_______________
*32224B240* 32224/B 240
Reg. No.
P.T.O.
32224/B 240 *32224B240*
PART – C
Answer any four of the following : (10�4=40)
8. Write a C program to create a file to store employee details like eno., ename and salary and
display its contents in proper format.
9. Explain the classification of data structures in detail.
10. a) Write a program to find binomial coefficient using recursion.
b) Explain the primitive operations on a stack. (5+5)
11. a) Explain circular queue and its operations using an example.
b) Define the following :
i) Node
ii) Degree of a node
iii) Root. (4+6)
12. Explain the different types of linked list with diagram.
_________________
Sl. No.
SECTION - A
I. Answer any ten of the following : 10x2=20
1. What is pointer ? Give an example.
2. Define binary search. Mention its complexity.
3. State the functions of error handling file.
4. Define calloc( ) function with example.
5. What is queue ? Give an example.
6. State the types of non-primitive Data Structure.
7. List the application of queue.
8. Define Depth and Circular linked list.
9. What is sorting ? State the types of sorting.
10. What is strictly binary tree ? Give example.
11. Define infix, prefix and postfix expression.
12. What do you mean by Heap ? Give an example.
SECTION - B
II. Answer any six of the following : 6x5=30
13. Write a program to implement tower of Hanoi.
14. Define Stack. Explain Stack operations.
15. Write a program to sort an elements using merge sort.
16. What is Linked List ? Give the advantages and disadvantages of Linked List.
P.T.O.
22224/B320 2
SECTION - C
III. Answer any three of the following : 3x10=30
21. Write a program to search an element using Binary search. 10
22. What is queue ? Explain the operations of priority queue. 10
23. Explain in detail types of inserting nodes in Linked List. 10
24. Briefly explain :
(a) Complete binary tree 5
(b) Binary search tree 5
25. Write a short note on any five : 2x5=10
(a) Application of stack
(b) Circular linked list
(c) Insertion sort
(d) Path
(e) Parent
(f) free( )functions
-oOo-
!22224B320!
*41223B230* 41223/B 230
Reg. No.
SECTION – A
SECTION – B
2. Write a program in C to read a text file and convert the file contents in uppercase
and write the contents in an output file.
SECTION – C
7. What is file ? Explain with syntax two input and two output functions related
to file.
___________________