0% found this document useful (0 votes)
278 views2 pages

Siddaganga Institute of Technology, Tumakuru - 572 103: Usn 1 S I OE02

(1) The document provides questions for a Data Structures exam with C programming language. It includes questions on dynamic and static memory allocation, binary search trees, linked lists, queues, stacks, trees, and graphs. (2) Students are asked to write C functions to perform operations on linked lists, stacks, and queues. Questions also cover concepts like dynamic memory allocation, postfix/prefix notation conversion, and tree and graph traversals. (3) The exam tests a range of data structures topics through questions that require writing C code to implement operations, explaining concepts, drawing examples, and more. It evaluates students' understanding of how to represent and manipulate common data structures in C

Uploaded by

S R GOWDA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
278 views2 pages

Siddaganga Institute of Technology, Tumakuru - 572 103: Usn 1 S I OE02

(1) The document provides questions for a Data Structures exam with C programming language. It includes questions on dynamic and static memory allocation, binary search trees, linked lists, queues, stacks, trees, and graphs. (2) Students are asked to write C functions to perform operations on linked lists, stacks, and queues. Questions also cover concepts like dynamic memory allocation, postfix/prefix notation conversion, and tree and graph traversals. (3) The exam tests a range of data structures topics through questions that require writing C code to implement operations, explaining concepts, drawing examples, and more. It evaluates students' understanding of how to represent and manipulate common data structures in C

Uploaded by

S R GOWDA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

USN 1 S I OE02

Siddaganga Institute of Technology, Tumakuru – 572 103


(An Autonomous Institution affiliated to VTU, Belagavi, Approved by AICTE, New Delhi)

Even Semester Bachelor of Engineering Examinations April - May 2019


Data Structures with C
Time: 3 Hours Max. Marks: 100
Note : 1. Question No. 1 is Compulsory.
2. Answer any 4 full questions from question No. 2 to Question No. 6.

1 a) Differentiate between dynamic and static memory allocation.


b) Construct BST for the following data 100, 10, 20, 15, 111, -5, 80.
c) Write C module to count the number of nodes in singly linked list.
d) Show the different status of circular queue of size 3 for the following operations. (i) Delete
(ii) Insert 10,20,30,40 (iii) Delete (iv) Insert 50.
e) Convert the following infix expression to postfix and prefix using manual method
(A$B /D* M) / (X$Y +Z).
f) Write C function to find product of array elements using pointers.
g) Show the status of stack of size 2 for the following operation.
(i) push 10, 20, 30 (ii) pop (iii) pop (iv) insert 55.
h) Construct binary expression tree for given expression (A* B/C+D)-(Z+Y$P)-M.
i) Write recursive function for binary search.
j) Given the employee structure definition and base address as 1000, compute the address of the
following (i)E[5].age (ii)E[3].dept
Struct employee { char Ename[20], int age, float salary, char dept[10];} 2  10

2 a) Write a program using pointers to determine the length of a character string. 6


b) How can a structure be declared using typedef? Briefly explain the concept of embedded
structures with an example. 6
c) Differentiate between dynamic memory allocation and static memory allocation. Explain C
built in dynamic memory allocation functions. 8

3 a) What a C program to perform PUSH and POP operations for STACKS using arrays. 6
b) Evaluate the following postfix notation using stack 8, 5, 2, *, +, 4, 2, /, - and also write the
algorithm for evaluation of a postfix expression. 6
c) What is the limitation of ordinary queue? Develop insertion and display modules for circular
queues using arrays. 8

4 a) Write C functions to perform the following operations on singly linked list. (i) To insert a
new node after a node. (ii) To delete the last node. 10
b) Write a C program to implement a queue using singly linked list. 10

5 a) Develop a C program to implement ascending priority queues using singly linked list. 10
b) What are the benefits of lists with a header node? 2
c) Write a C function to search for a key element in a doubly linked list. 4
d) Develop C module to create circular singly linked list. 4

6 a) Write the memory representation for the given Fig. 6a


weighted graph.

Fig. 6a 4
-1- Please Turn Over
-2- OE02
b) Write recursive function for counting the number of leaf nodes in binary tree. 3
c) What is the meaning of traversing a tree? Write C functions to traverse the tree using
preorder, post order and inorder traversal. 7
d) Explain the following with appropriate examples.
(i) Threaded Binary tree (ii) Strictly Binary tree. 6
________

You might also like