Copy of OR-210154-Data Structures through C

advertisement
Code No. 210154
II B.Tech. I-Semester Supplementary Examinations, November-2003
OR
DATA STRUCTURES THROUGH C
(Common to Civil Engineering, Computer Science and Information Technology,
Mechanical Engineering, Computer Science and Engineering, Electronics and
Control Engineering, Electronics and Instrumentation Engineering, Production
Engineering, Mechatronics)
Time: 3 hours
Max. Marks:70
Answer any FIVE questions
All question carry equal marks
---
1.a)
b)
2.a)
b)
c)
Create a structure in C to specify data on customers in a bank. The data to be
stored is:
Account no, name, balance in account.
Assume maximum of 100 customers in the bank. Write a function in C to print the
Account no and name of each customer with balance below Rs. 500.
Write a C program that counts the number of characters and lines in a text file.
Derive the general formula for accessing an element in a two dimensional array
stored in column-major order.
Explain with an example how a polynomial in two variables is represented using a
linked linear list.
Discuss the multilinked structure representation of a sparse matrix.
3.a)
b)
Distinguish between sequential and linked allocation for representing linear list.
Write a C function to delete an integer element from a given doubly linked linear
list of integers.
4.a)
b)
Write a recursive function in C to compute an where a is real and n is an integer.
Write C functions for insertion and deletion operations on a circular queue.
5.a)
b)
c)
Explain with an example how a stack is implemented using a linked list.
Write C functions for push and pop operations in a linked stack.
Compare the array and pointer representations of stacks in C.
6.a)
Discuss the following storage representations for binary trees:
(i)
Linked storage representation.
(ii)
Threaded storage representation
(iii) Sequential representation.
Write a function in C to count the number of leaf nodes in a binary tree.
b)
Contd…2
Code No. 210154
-2-
OR
7.a)
b)
Write insertion sort algorithm for sorting an array of integers in ascending order.
Write a C program which implements binary search to search for an integer in a
given array of stored integers.
8.
Write short notes on the following:
(a)
Collision resolution techniques in hashing.
(b)
Adjacency list representation of a graph.
(c)
Depth first search of a graph.
^^^
Download