Set No.

Code No. 220104 II Year II-Semester Supplementary Examinations November 2003 DATA STRUCTURES THROUGH ‘C’ (Civil Engineering) Time: 3 hours Max. Marks: 80 Answer any Five questions All question carry equal marks --1. a) b) 2. a) b) 3. a) b) 4. a) b) 5. a) b) 6. a) b) 7. a) b) 8. Name different data structures. Explain applications of multidimensional arrays. Write a ‘C’ program to multiply two matrices. Compare a linear linked list with a linear array. Write a ‘C’ program that merges two sorted linear linked lists. Explain different operations on stacks. Show how a stack is represented on memory. Write a ‘C’ program to convert into a expression to post fix expression. Define queue. Write a ‘C’ program to count number of elements in a circular queue. Describe applications of queues. Describe different types of trees. Write ‘C’ program to implement various operations on a binary tree. What are applications of trees and graphs. Write ‘C’ program to describe one application of tree. Define sorting. Name different sorting techniques. Write ‘C’ program to implement binary search. Write short notes on the following: (a) Representation of graphs (b) Representation Vs Implementation. (c) Minimum spanning tree. ###

1

Set No.
Code No. 220104 II Year II-Semester Supplementary Examinations November 2003 DATA STRUCTURES THROUGH ‘C’ (Civil Engineering) Time: 3 hours Max. Marks: 80 Answer any Five questions All question carry equal marks --1. a) b) 2. a) b) 3. a) b) 4. a) b) 5. a) b) 6. a) b) 7. a) b) 8. Differentiate between one dimensional and multidimensional arrays. Explain why array called as dense list. Write a ‘C’ program that test a matrix whether it is a magic square or not. Define ‘list’. What are different types of lists? Write a ‘C’ program to traverse a circular linked list. Differentiate between stacks and queues. Write a ‘C’ program to implement various operations on stacks. Name different types of queues. Show representation of circular queue in computer memory. Write ‘C’ function to show basic operations on a queue. Define binary tree. Write ‘C’ function to implement binary search tree. Explain all tree traversals with an example. Write ‘C’ function to in-order and post-order traversals of a binary tree. Define searching. Describe binary searching technique. Write ‘C’ program to implement quick sort. Write short notes on the following: (a) Applications of linked lists. (b) Representation of circular queue. (c) Graph traversals. ###

2

Set No.
Code No. 220104 II Year II-Semester Supplementary Examinations November 2003 DATA STRUCTURES THROUGH ‘C’ (Civil Engineering) Time: 3 hours Max. Marks: 80 Answer any Five questions All question carry equal marks --1. a) b) 2. a) b) 3. a) b) 4. a) b) 5. a) b) 6. a) b) What is an array? What are different types of arrays? What are limitations of each? Write a ‘C’ function that interchanges the first element with the last element, second element with the second last element and so on. Name different types of linked lists. What are the advantages of circular linked lists over others? Write ‘C’ function to perform various operations on a linear linked list. Define stacks and queues. What are the applications of each? Write a ‘C’ program to evaluate post fix expression. Write a ‘C’ program to implement various operations on a queue. Differentiate between queue and circular queue. Describe how a binary tree can be represented using linked lists. What are different tree traversal methods? Write ‘C’ functions for them. Describe different graph traversals with suitable example. Construct a binary tree for the given traversals. Pre A B D G E C F order: In order: G D B E A C F Name different sorting and searching methods. Write ‘C’ program to implement partition exchange sort. Write short notes on the following: a) Basic operations on data structures b) Adjacency matrix c) Minimum spanning tree. ###

3

7. a) b) 8.

Set No.
Code No. 220104 II Year II-Semester Supplementary Examinations November 2003 DATA STRUCTURES THROUGH ‘C’ (Civil Engineering) Time: 3 hours Max. Marks: 80 Answer any Five questions All question carry equal marks --1. a) b) 2. a) b) 3. a) What are different types of arrays? How they are represented in memory. Write a program to check for all odd numbers in a matrix. Explain different basic operations on data structures. Write ‘C’ program to convert infix notation to postfix form. Translate the following expression in to its equivalent postfix expression. i) ( A + B / D ) / ( E −F ) + G ii) A*B−(C+D)/(E −F)+G/ H Write a ‘C’ program to count number of nodes in a doubly linked list. Define queue. Describe applications of queues. Write a ‘C’ program to implement circular queue. Write a ‘C’ program for traversing a binary tree. Describe how a binary tree can be represented using an array. For a binary tree the preorder and inorder traversal sequences are as follows. Pre order: A B L M K N P Q In order : L B M A N K Q P Draw the binary tree. Differentiate between Tree and graph in terms of representations. Among linear and binary search methods which is efficient? Why? Write ‘C’ program to implement quick sort. Write short notes on the following. a) Applications of stacks. b) Adjacency matrix. c) Selection sort.

4

b) 4. a) b) 5. a) b) 6. a)

b) 7. a) b) 8.

~~~~