0% found this document useful (0 votes)
267 views

Data Structure Question Bank

Data structure Question papers

Uploaded by

Anil Anil patil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
267 views

Data Structure Question Bank

Data structure Question papers

Uploaded by

Anil Anil patil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

No.

of Printed Pages : 2
41223/B230
!41223B230! Reg. No.

II Semester B.C.A. 4 Degree Examination, May - 2019


DATA STRUCTURE USING ‘C’
Theory
(RUC - 2017-18)
Time : 3 Hours Maximum. Marks : 80

Instructions : (1) Answer all sections.

(2) Draw neat diagrams wherever necessary.

(3) Write question numbers correctly.

SECTION - A

1. Answer all questions : 10x2=20

(a) What is pointer to pointer ? How to declare it ?

(b) What is a file ? Mention its different access modes.

(c) What is Static Memory Allocation ?

(d) What are primitive and non-primitive data structures ? Give examples.

(e) What is LIFO ? List applications of it.

(f) What are the drawbacks of ordinary queue ?

(g) Write the syntax of any two file input functions.

(h) Differentiate between singly linked list and doubly linked list.

(i) What is empty linked list ?

(j) What is priority queue ? Mention different types of it.

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.

3. Explain the concept of Bubble Sort technique with an example.

4. Write a note on Tower of Hanoi.

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 ?

6. Explain circular linked list.

SECTION - C
Answer any four questions. 4x10=40
7. What is Dynamic Memory Allocation ? Explain DMA functions.

8. (a) Write a program in C to print n fibonacci numbers using recursion. 5


(b) Convert the following expressions to postfix :
(i) ((A∗(B+C))/(D)−F 3
(ii) (x+y)∗(m/n+d) 2
9. Apply quicksort technique and sort the following numbers in ascending order. Also
write quicksort function for the same.
56, 24, 43, 92, 52, 41, 32.

10. What is queue ? Explain different types of queues.

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.

II Semester B.C.A.3 Degree Examination, May - 2019


DATA STRUCTURE USING C
Theory
RCU (Repeaters)

Time : 3 Hours Max. Marks : 80

Instructions : (1) Answer all parts.


(2) Draw neat diagram wherever necessary.
(3) Write question numbers correctly.

PART - A

1. Answer any ten of the following : 10x2=20

(a) Define structure ? Write the syntax of structure.

(b) Write the syntax of get c ( ) and put c ( ) functions.

(c) Mention the types of dynamic memory allocations.

(d) What do you mean by postfix expression ? Give an example.

(e) Define recursion. Give an example.

(f) Mention any two advantages of Doubly Linked List.

(g) What is self-referential structure ?

(h) What do you mean by stack ?

(i) Mention the techniques of Binary tree traversal.

(j) How do you declare a file pointer ?

(k) What do you mean by complete binary tree ?

(l) List the applications of a queue

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.

3. Convert the following infix expression to postfix and prefix form.


(x ^ y) + z * M - N / (p * Q)

4. Write a program to find GCD of two numbers.

5. Explain any two types of Linked List.

6. Write a note on error handling in files.

7. Define Binary tree. Explain the binary search tree.

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

9. Explain the classification of data structures in detail.


10

10. Write a program to demonstrate the working of singly linked list.


10

11. (a) Explain primitive operations on stack.


5
(b) Write a program to find binomial co-efficient using recursion.
5

12. Define the following terms with example :


5x2=10
(a) Node
(b) Depth
(c) Root
(d) Sibling
(e) Substree

-oOo-

!32224B240!
*32224240* 32224/B 240
Reg. No.

II Semester B.C.A.3 Degree Examination, May/June 2017


DATA STRUCTURES USING ‘C’
(2014-2015 Onwards)
(Regular and Repeater)
Time : 3 Hours Max. Marks : 80

Instructions : 1) Answer all Sections.


2) Draw neat diagram wherever necessary.
3) Write question numbers correctly.

SECTION – A

1. Answer any ten questions : (10×2=20)


a) What is data structure ? Mention its applications.
b) Define structure and union.
c) What is the purpose of getw( ) and putw( ) functions ?
d) What is LIFO data structure ? How do you declare it using structure ?
e) What is the purpose of fwrite( ) statement ?
f) What is the use of sizeof( ) and free( ) functions ?
g) State advantages of circular queue.
h) What is double ended queue ? Mention its types.
i) What is self referential structure ?
j) What is empty list ?
k) Define strictly binary tree.
l) Define level of a tree.

SECTION – B

Answer any four questions : (4×5=20)

2. Explain file error handling functions.

3. Compare malloc( ) and calloc( ) functions.


P.T.O.
32224/B 240 *32224B240*

4. Write a C program to print nth Fibonacci number using recursion.

5. Write following functions to demonstrate stack operations :


1) push( )
2) pop( ).

6. Differentiate between singly linked list and doubly linked list.

7. Explain complete binary tree and binary search tree.

SECTION – C

Answer any four questions : (4×10=40)

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

9. Convert the following infix expressions to postfix and prefix expressions.


1) x * y – z ∧ M + N – P/Q. 4
2) A * B – C + D/(E + F). 4
3) (A + B) * (D – C). 2

10. a) Differentiate between ordinary queue and circular queue.


b) Write a note on priority queue. (5+5)

11. Explain the following terms :


1) Ancestors
2) Forest
3) Path
4) Non-terminal node
5) Degree of a tree. (2+2+2+2+2)

12. Write short notes on any two :


1) Pointers
2) File I/O functions
3) Circular linked list. (5+5)
_______________
*22224B320* 22224/B 320
Reg. No.

II Semester B.C.A. 2 Degree Examination, May/June 2018


DATA STRUCTURES USING C
(Repeaters)
Time : 3 Hours Max. Marks : 80

Instructions : 1) Answer all Sections.


2) Draw neat diagrams wherever necessary.

SECTION – A

I. Answer any ten of the following questions : (10�2=20)


1) What is a pointer ? Write its syntax.
2) Define data structure.
3) Explain the syntax of fprintf ( ) function with a syntax.
4) What is searching ? Mention any 2 search techniques.
5) What is a recursive function ? Give an example.
6) Mention the applications of stack.
7) List different types of queue.
8) Define linked list. Draw the diagrammatic representation of a linked list.
9) What is a complete binary tree ? Give example.
10) What is the use of malloc ( ) function ?
11) Explain any four file access modes.
12) What is LIFO data structure ? How do you declare it ?

SECTION – B

II. Answer any six questions : (5�6=30)


13) What is dynamic memory allocation ? Explain various memory allocation
and deallocation functions.

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

15) Write a short note on selection sort.

16) Write a program to calculate GCD of 2 nos using recursion.

17) Write the insert and delete functions for a regular queue.

18) Convert the following expressions into postfix :


a) * + mn/xy
b) ((a * b + c) + d/f).

19) Write a program to sort elements using bubble sort.

20) Describe insertion of nodes in linked list.

SECTION – C

III. Answer any three questions of the following : (3�10=30)

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.

22) What is a stack ? Explain different operations of stack with an example.

23) Write short notes on any two :


a) Circular queue
b) Double ended queue
c) Priority queue.
*22224B320* -3- 22224/B 320

24) a) Define inorder, preorder and postorder for binary tree.


b) Traverse the following tree in inorder, preorder and post order


25) Explain the following :
a) Doubly linked list
b) File error handling functions.

_____________
*22224B320* 22224/B 320
Reg. No.

II Semester B.C.A. 2 Degree Examination, May/June 2017


DATA STRUCTURES USING C
Theory
(2011-2012 Onwards) (Repeater)
Time : 3 Hours Max. Marks : 80

Instructions : 1) Answer all Sections.


2) Draw neat diagrams wherever necessary.
3) Write question number correctly.

SECTION – A

Answer any ten questions : (2×10=20)

1. Define data structure. Explain its types.

2. Define pointers. How to declare and initialize pointers ?

3. How static memory allocation is different from dynamic memory allocation ?

4. Write a syntax of malloc( ) function.

5. List the various input/output functions of file in C.

6. What is random access file ? Explain fseek( ) and ftell( ) functions.

7. Define recursion. State its advantages.

8. Write an algorithm to search an element using binary search.

9. What is sorting ? List its different types.

10. Define stack. What are its applications ?

11. What is priority queue ?

12. What is binary search tree ?

P.T.O.
22224/B 320 *22224B320*

SECTION – B

Answer any six : (5×6=30)

13. What is static memory allocation ? State the advantages of dynamic memory
allocation over static memory allocation.

14. Write a program to find GCD of using recursion.

15. Write an algorithm for PUSH and POP operations.

16. Define file. Explain any 5 access mode for opening a file.

17. State the advantages and disadvantages of linked list.

18. Write the sort elements in ascending order using selection sort.

19. Convert the following to infix.


i) – / * A + BCDF ii) ABC ^ + iii) +/x ^ yza

20. Explain preorder, postorder and inorder tree traversal.

SECTION – C

Answer any 3 questions. (10×3=30)

21. Explain in brief different types of non-primitive data structure.

22. Apply bubble sort technique and sort the following numbers in ascending order.
67 22 42 90 54 46 32

23. Explain the following terms :


i) Tree
ii) Degree of a node
iii) Rool
iv) Ancestors
v) Siblings.

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.

II Semester B.C.A. 3 Degree Examination, May/June 2018


(Repeaters)
Data Structures using ‘C’
Time : 3 Hours Max. Marks : 80
Instructions : 1) Answer all Parts.
2) Draw neat diagrams wherever necessary.
3) Write question numbers correctly.
PART – A
1. Answer any ten of the following : (2�10=20)
a) What is a structure ? Give example.
b) Write the syntax of getc() and putc() functions.
c) What are primitive and non primitive data structures ?
d) Convert the following expression from infix to postfix :
(A + B) * C/D.
e) Define recursion.
f) What is FIFO ?
g) What are the advantages of a Linked List ?
h) What are self referential structures ?
i) Define Binary tree.
j) Which are the different traversal techniques for a binary tree ?
k) What is a pointer ?
l) List the applications of a queue.
PART – B
Answer any four of the following : (5�4=20)
2. Write a program to implement the working of a stack.
3. Differentiate between static and dynamic memory allocation methods.
4. Write a program to demonstrate the working of a simple queue.
5. Write a note on representation of a Linked List.
6. Explain complete binary tree and binary search tree.
7. Write a note on error handling in files.

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.

No. of Printed Pages : 2


22224/B320
!22224B320! Reg. No.

II Semester B.C.A. 2 Degree Examination, May - 2019


DATA STRUCTURE USING C
PAPER - II
(RCU Repeaters)

Time : 3 Hours Max. Marks : 80

Instructions : (1) Answer all sections.


(2) Draw neat diagram wherever necessary.
(3) Write question numbers correctly.

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

17. Convert the following to postfix.


(a) (P+Q)∗(R/Z)$(E−D)
(b) (A+B$C$D)∗(P−Q/D)
18. Compare Merge sort and Quick sort.
19. Explain Pre-order, Post-order and Inorder for binary tree.
20. Differentiate between Textfix and Binary file.

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.

II Semester B.C.A.4 Degree Examination, May/June 2018


DATA STRUCTURES USING ‘C’
(Regular)
Time : 3 Hours Max. Marks : 80

Instructions : 1) Answer all Sections.


2) Draw neat diagrams wherever necessary.
3) Write question numbers correctly.

SECTION – A

1. Answer all questions : (10×2=20)


a) List advantages of pointer.
b) State the use of calloc ( ) function with syntax.
c) State the purpose of rewind ( ) function.
d) List applications of data structures.
e) What is recursion ?
f) Evaluate the following postfix expression 12 – 34 – *.
g) What is circular queue ?
h) Differentiate between linear search and binary search.
i) State advantages of linked list.
j) Define a node in a singly linked list.

SECTION – B

Answer any four questions : (4×5=20)

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.

3. Discuss the classification of data structure with example.

4. Define stack. Explain various operations performed on stack.


P.T.O.
41223/B 230 *41223B230*
5. Explain double ended queue.

6. Write a note on doubly linked list.

SECTION – C

Answer any four questions : (4×10=40)

7. What is file ? Explain with syntax two input and two output functions related
to file.

8. a) Explain the merge sort technique with example.


b) Write a program in C to find GCD of two numbers using recursion. (5+5)

9. a) Convert the following expressions to postfix expression.


i) ((A + (B – C) * D) ^ E + F)
ii) (a+(b*c) – d)/e.
b) Write a program in C to search an element in an array using sequential
search. (5+5)

10. Write a program in C to perform all operations on ordinary queue.

11. Write short notes on any two : (5+5)


i) Dynamic Memory Allocation
ii) Tower of Hanoi
iii) Conversion of expressions using stack.

___________________

You might also like