Вы находитесь на странице: 1из 2

EC362

RAMAIAH USN 1 M S
INSTITUTE OF
TECHNOLOGY

(Autonomous Institute, Affiliated to VTU)


Bangalore – 560 054

MAKE UP EXAMINATIONS – FEBRUARY 2017


B.E : Electronics and Communication
Course & Branch : Semester : III
Engineering
Subject : Data Structures using C Max. Marks : 100
Subject Code : EC362 Duration : 3 Hrs

Instructions to the Candidates:


 Answer one full question from each unit.

UNIT – I
1. a) Write a C program to implement Stacks using array. CO1 (10)
b) What would be the content of queue ‘Q’ after the pseudo code CO1 (10)
is executed and the following data are entered? The data are:
5,7,12,4,0,4,6,8
Q= create queue;
Loop(not end of file);
Read number;
If(number not 0)
Enqueue(Q, number)
Else
X=queue rear(Q);
Enqueue(Q,X);
End if
End loop

2. a) Write a C program to implement QUEUE using array. CO1 (10)


b) Explain the procedure to convert the infix expression into postfix expression CO1 (10)
with an example.

UNIT – II
3. a) Write a C function to insert a node in the rear end of circularly singly linked CO2 (06)
list.
b) Describe the differences between singly and doubly linked lists. CO2 (06)
c) Write a C functions to perform the following operations on a database using CO2 (08)
doubly linked list.
(i) Insert_front (ii) Delete_rear (iii) Display

4. a) Define linked list. Mention the different types of it with neat diagrams. CO2 (06)
b) Write a C function to search for an item in a circularly singly linked list. CO2 (06)
c) Write a C functions to perform the following operations using singly linked CO2 (08)
list (i) PUSH (ii) POP.

Page 1 of 2
EC362
UNIT – III
5. a) Explain the difference between bubble sort and selection sort with an CO3 (10)
example.
b) Write and explain linear search procedure or algorithm with a suitable CO3 (10)
example.

6. a) Explain in detail about sorting and different types of sorting techniques. CO3 (10)
b) Write a C program that searches a value in a stored array using linear CO3 (10)
search.

UNIT – IV
7. a) Draw the tree for the given in-order & pre-order expressions. CO4 (10)
(i) In-order- GDHBAEICF Pre-order- ABDGHCEIF
(ii) In-order- 23 26 43 78 94 97 Pre-order- 78 26 23 43 94 97
b) What is a tree? Define the following terms. children nodes, siblings, root CO4 (10)
node, leaves level and degree of tree.

8. a) Write a C program to insert an item in a Binary search tree (with duplicate CO4 (10)
elements)
b) Construct expression tree for the expression: CO4 (10)
(i) a*(b+c)/d-e (ii) ((6+(3-2)*5)^2+3)

UNIT – V
9. a) Find the BFT and DFT for given graph start form ‘1’ CO5 (08)

b) For the graph shown write adjacency matrix and list. CO5 (08)

c) What is a spanning Tree? CO5 (04)

10. a) Draw a complete undirected graph having five nodes. CO5 (05)
b) Write Short note on: (i) Graph with self-loop (ii) Cycle. CO5 (05)
c) For the network shown find Minimum Spanning Tree using Kruskals CO5 (10)
algorithm.

****************

Page 2 of 2

Вам также может понравиться