# Anna University Programming and Data Structure Model Test Paper

FOURTH SEMSTER- PROGRAMMING AND DATA STRUCTURES

ELCTRONICS AND COMMUNICATION ENGINEERING

Time : Three hours Maximum : 100 marks

Answer ALL questions.

PART A — (10 ´ 2 = 20 marks)

1.Define Pseudo Code.

2.What do Time Complexity and Space Complexity mean?

3.Give two examples for Divide and Conquer Algorithm.

4.What is meant by Recursion? Give an example.

5.Write the hierarchy of operations in C Language.

6.What is the basic difference between Structure and Union in C?

7.Define Complete Binary Tree.

8.What is the difference between Singly Linked List, Doubly Linked List and Circularly Linked List?

9.What is meant by Minimum Spanning Tree?

10.When a Graph becomes a Tree?

PART B — (5 ´ 16 = 80 marks)

11.Explain the backtracking technique used to solve the 4–queens problem.

12.(a) Explain the implementation of merge sort using divide and conquer method.

Or

(b)Explain the different ways of parameter passing with suitable example.

13.(a)Write a C Program to Create and Read a data file.

Or

(b)What is meant by self–referential structures? Explain with an example.

14.(a)What is Towers of Hanoi Problem? Explain how stack is used to solve it for a problem with 3 Pegs and 3 Disks.

Or

(b)Explain a procedure to convert a General Tree into a Binary tree with an example.

15.(a)Explain any one algorithm to find the Minimum Spanning Tree for a Graph.

Or

** **(b)Explain the differences between linear search and binary search.

Anna University Programming and Data Structure Model Test Paper