Anna University Programming and Data Structure Model Test Paper for CSE

Anna University Programming and Data Structure

Model Test Paper for CSE

SECOND SEMSTER- PROGRAMMING AND DATA STRUCTURES

COMPUTER SCIENCE & ENGINEERING

Time : Three hours                                                                        Maximum : 100 marks

Answer ALL questions.

PART A — (10 ´ 2 = 20 marks)

1.Differentiate Iteration and Recursion.

2.What are the primitive data types in C?

3.What is the use of pre processor in C?

4.What is meant by Garbage Collection?

5.What are the basic operations performed on any data structure?

6.Define Stack and Queue.

7.How binary search tree is different from binary tree?

8.Define Hashing.

9.Write the time complexities of bubble sort and quick sort.

10.Find the time complexity to perform binary search in an unsorted array of

  1. n’ numbers.

PART B — (5 ´ 16 = 80 marks)

11.Write a modular program in C to perform addition, subtraction and multiplication of two matrices of order ‘n ´ n’ and find  where

  1. A, B, C and D are ‘n ´ n’ matrices.
  2. 12.(a)Differentiate ‘‘while’’ statement and ‘‘do–while’’ statement with an example program.

 Or

(b)Explain how the ‘‘switch’’ statement is used in the programs instead of multiple ‘‘if–else’’ statements with suitable example program.

13.(a) Explain how the following ‘‘infix’’ expression is evaluated with the help of Stack :

                       .

Or

 (b) Explain the procedure to delete a node with a given item of information in a singly linked list.

14.(a)Construct a binary tree to satisfy the following orders :

                       Inorder     : D B F E A G C L J H K

                       Postorder : D F E B G L J K H C A

Or

 (b)Construct a heap for the following set of numbers :

            

15.(a)Explain the algorithm for Insertion sort and sort the following array :

                       77, 33, 44, 11, 88, 22, 66, 55.

 Or

(b) Explain how the divide and conquer technique is implemented in binary search.

Anna University Programming and Data Structure Model Test Paper for CSE

Leave a Comment