OR | <>
>
Code No. 210154
II B.Tech. I-Semester
Supplementary Examinations, November-2003
Supplementary Examinations, November-2003
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)
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) Create a structure in C to specify data on
customers in a bank. The data to be stored is:
customers in a bank. The data to be stored is:
Account no, name, balance in
account.
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.
the bank. Write a function in C to print the Account no and name of each
customer with balance below Rs. 500.
b) Write
a C program that counts the number of characters and lines in a text file.
a C program that counts the number of characters and lines in a text file.
2.a) Derive the general formula for accessing
an element in a two dimensional array stored in column-major order.
an element in a two dimensional array stored in column-major order.
b) Explain
with an example how a polynomial in two variables is represented using a linked
linear list.
with an example how a polynomial in two variables is represented using a linked
linear list.
c) Discuss the multilinked
structure representation of a sparse matrix.
structure representation of a sparse matrix.
3.a) Distinguish between sequential and linked allocation for
representing linear list.
representing linear list.
b) Write a C function to delete an integer
element from a given doubly linked linear list of integers.
element from a given doubly linked linear list of integers.
4.a) Write a recursive function in C to compute an where a is
real and n is an integer.
real and n is an integer.
b) Write C functions for
insertion and deletion operations on a circular queue.
insertion and deletion operations on a circular queue.
5.a) Explain with an example how a stack is implemented using a
linked list.
linked list.
b) Write C functions for push
and pop operations in a linked stack.
and pop operations in a linked stack.
c) Compare the array and
pointer representations of stacks in C.
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.
b) Write a function in C to count the number of
leaf nodes in a binary tree.
leaf nodes in a binary tree.
Contd…2
Code No. 210154 -2- OR
7.a) Write insertion sort algorithm for sorting an array of integers
in ascending order.
in ascending order.
b) Write a C program which implements binary
search to search for an integer in a given array of stored integers.
search to search for an integer in a given array of stored integers.
8. Write short
notes on the following:
notes on the following:
(a) Collision resolution techniques in
hashing.
hashing.
(b) Adjacency list representation of a graph.
(c) Depth first search of a graph.
No comments:
Post a Comment