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

Dsa Module01 Module02 Questions Updated

Uploaded by

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

Dsa Module01 Module02 Questions Updated

Uploaded by

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

DSA (BCS304) QUESTIONS 2024-2025

MODULE-01
1. Define Data structures. Explain with neat block schematic different type of data
structures with examples. What are the primitive operations that can be performed.
2. Write an algorithm to evaluate a postfix expression and apply the same for the given
postfix expression 6, 2, /, 3, -, 4, 2, *, +
3. Define stack. Give the implementation of push( ), pop( ), and display( ) function by
considering its empty and full conditions.
4. Define Spare matrix. Express following matrix in triplet form and find its transpose.

5. Differentiate between structures and unions shown examples for both.


6. Write an algorithm to convert infix to postfix expression. Show the content of stack
to convert the following expression into Postfix expression (a/(b-c+d))*(e-a)*c
7. Write an algorithm to evaluate a postfix expression and apply the same for the given
postfix expression 5, 4, 6 , +, *, 4, 9, 3, /, +, *
8. Define polynomial. Show the array representation of polynomials. Write a C
function to add two polynomial A(x) and B(x) term by term to produce D(x).
9. Write an algorithm to convert infix to postfix expression. Show the content of stack
to convert the following expression into Postfix expression a/b-c+d*e-a*c
10. Define strings. List and explain any five operations with example
11. Define stack. Write a menu driven C program for the following operations on
STACK of integers:
i) push an element on to stack
ii) pop an element from the stack
iii) Display the contest of stack
iv) Show the overflow and underflow conditions
v) Exit.

12. Explain dynamic memory allocation and its advantages compared to static memory
allocation. What are the key dynamic memory allocation functions available in C?
13. What is a structure? How is it different from arrays? Using nested structures, write a C
program to store and display Student information for the following fields Sname, Sid, DOB
(Date, Month, Year).
14. What is a sparse matrix? Express the following matrix in triplet form, find its
transpose, and write a C function to transpose the sparse matrix.
15 0 0 22
0 11 3 0
0 0 0 -6
0 0 0 0
91 0 0 0
0 0 28 0
15. Write C function to convert infix to postfix expression and solve the following postfix
expression using stack (A+ B * C) *((D + E-F)/J)
16. Write function in C to evaluate postfix expression using stack and solve the following
expression showing the stack content 1 2 3 + * 3 2 1- +*
Module-02
1. List the different types of queues. State the limitation of ordinary queue.
2. Discuss how to represent circular queue using dynamic arrays.
3. Define queue. Write a C functions for inserting and deleting an element from a
Queue.
4. Discuss the implementation of circular queue.
5. Define Circular queue. Write a C functions for inserting and deleting an element
from a Circular Queue.

You might also like