You are on page 1of 5

Sinhgad Technical Institutes Campus

RMD Sinhgad School of Engineering, Warje, Pune


Department of Information Technology
Academic Year 2014-2015
Subject:Data Structures and Files Question Bank for Unit 5 Class: Second Year (IT)/ SEM II
Sr. No. Questions Month & Year Weightage
of Exam
1 Obtain AVL Tree for the following data . Show the balance factor for each node and also SE-2009, 10
rotation type used:
30, 31, 32, 23, 22, 28, 24, 29, 26, 27, 34, 36
Construct an AVL Search Tree by inserting the following elements in the order of their
occurrence. Show the BF and type of rotation at each stage: SE-2010 8
64, 1, 44, 26, 13, 110, 98, 85
2 Write notes on SE- 2009, 8
i. OBST
ii. Static and Dynamic Trees (tables) SE -2012(Comp) 4
iii. Symbol table
iv. Huffman code
3 Perform Heap Sort to sort the given list of no.s. Show each step for creating a max heap and SE-2009 10
show each step to sort the heap:
D, A, T, A, S, T, R, U, C, T, U, R, E, S
4 Suppose A to H are 8 data items with weights as follows: SE- 2009 8
22, 5, 11, 19, 2, 11, 25,5
Find a Huffman code for each of data items.Build a Huffman tree and find code of each
Symbol. SE.(IT) 2010 8
5 Define Hashing. What are the characteristics of a good hash function? How can collision be SE 2009, 8
resolved in a hash table. SE(IT) 2010 6
For the given set of data values, create a hash table of size 10 and use linear probing with and
without replacement for resolving collision. Use any hash function :
10, 45, 32, 100, 58, 3, 126, 29, 200, 0
6 Write a note on Re-Hashing. SE- 2009 4
7 In Hashing, What is meant by collision resolution? What are the different ways of collision SE- 2009, 8,
resolution?
OR
What is collision? What are different collision resolution techniques? Explain any two methods SE-2010(Comp)
in detail. 8
8 For the given set of data values, create a hash table of size 10 and use chaining with and without SE-2009, 8
replacement for resolving collisions. Use suitable hash function.
9, 45, 59, 13, 75, 12, 88, 11, 46, 105

9 What is AVL Tree? Explain the RR and LL rotations with example. SE- 2010(E&TC) 6
Create an AVL Tree for the following data :
40, 20, 10, 30, 70, 60, 55 6
OR SE- 2010(Comp)
Create an AVL Tree for the following data :
65, 85, 95, 30, 06, 71, 23, 99,44, 21 8
10 What is height- balanced tree? Explain with one example SE- 2010(Comp) 4
11 Write a Pseudo C algorithm for LL, RR, LR and RL rotations for AVL Tree. SE-2010(Comp), 8 (Ms.Prac
hiSorte)
Subject 12 Define Max Heap. Write Pseudo C Code for the following operations on Max Heap: S.E.2010(Comp) 10 Incharge
Sinhgad i) Insertion of element in max heap Technical
ii) Deletion of an element from max heap
Institutes Campus
Mention time complexity of each operation.
RMD Sinhgad
13 Create Min Heap (Binary) for S.E.2010(Comp) 10
10, 12, 1, 14, 6, 5,8, 15, 3,9, 7,4 11, 13
School of Engineering, Warje, Pune
Department of Information Technology
Academic Year 2014-2015
Subject: Data Structures and Files Class: Second Year (IT)
SEM-II
Question Bank for Unit 6
Sr. Questions Month & Year of Exam Weightage
No.
1 Write pseudocode for implementation of simple index file. Examination 2009 4
2 What is file? Explain types of files. Examination 2010 4
Explain different modes of opening files. (Comp), Examination 4
Explain in detail different file organizations 2010 (Comp) 6
OR
What is a File? List different file opening modes? List the different types of external
storage devices.? Examination 2012 6
3 Write a C/C++ program to create a file. Insert records in file by opening file in append Examination
mode. Display all records and search for a specific record entered by user. SE2010 (Comp) 8
4 Write a C/C++ program to implement direct access file for employee database and Examination 2010 10
perform insert a record, search a record, and display database.
5 Explain various file opening modes with respect to text and binary files Examination 2010 (IT) 6
OR
Compare text and binary files Examination 2010 (IT) 6
6 Explain features of sequential file. Write a C program to copy contents of one file to Examination 2010, 6
another using command line arguments.
7 Explain features of a random access file. Write a C program to find sum of no.s passed as Examination 2010 (IT), 6
command line arguments.
8 With the prototype and example, explain the following functions: Examination 2012 4
i) Seekg() ii) tellp()
9 Write C++ implementations of all primitive operations on Sequential File Examination 2012 8
10 Compare Sequential, Index Sequential and direct access Files. Examination 2012 6
11 Write a program in ‘C’ for sequential file and perform the Extra Questions
following operations.
a. Copying all data from one file to another
b. Count number of characters in a file
c. Count number of words in file
d. Search a particular word in a file
e. Count no. of white spaces
f. Count no. of special characters

12 Write a pseudo code to perform the following operations on direct access file.To modify
record with given value
i) To delete record with given value.
ii) Insert record at specific location with given key value.
13 Write a program in ‘C++’ for sequential file and perform the following operations Extra Questions
i. Copying all data from one file to another
ii. Count number of characters in a file
iii. Count number of words in file
iv. Search a particular word in a file

14 Explain the following with example with respect to files inC++. Extra Questions
(1) Fread (2) Fwrite (3) Fseek (4) Ftell (5) Fopen
15 What are different types of indexes? What are inverted files? Extra Questions
16 What is command line argument? What are the applications of command line argument? Extra Questions
17 Write pseudo code to read and write contents using index sequential file. Extra Questions
Write pseudo code for implementation of primitive functions of index- sequential file.
(Ms.Prachi Sorte)

Subject Incharge

You might also like