EC2202 DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++ ANNA UNIVERSITY PREVIOUS YEAR QUESTION PAPER APRIL/MAY 2010 FOR ECE DEPARTMENT ...
Posted by R.Anirudhan
B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 2010
Electronics and Communication Engineering
EC2202 — DATA STRUCTURES AND OBJECT ORIENTED
PROGRAMMING IN C ++
Time: Three hours Maximum: 100 Marks
Answer ALL Questions
PART A — (10 × 2 = 20 Marks)1. How is a class declared in C++?
2. What is a scope resolution operator and how can it be used for global variable?
3. What is meant by binding?
4. How the pointer is implemented in C++?
5. Write any two data structures used in Operating System?
6. What are the representations of Big and small ‘O’ notations?
7. How many trees are possible with 3 nodes?
8. What is a spanning tree?
9. What is the feature of bucket sort algorithm?
10. Define dynamic programming.
PART B — (5 × 16 = 80 Marks)11. (a) (i) Give the syntax and usage of the reserved word inline with two
(ii) Explain the importance of constructors and destructors with
(b) What is operator overloading? Overload the numerical operators ‘+’and ‘/’
for complex numbers “addition” and “division” respectively. (16)
12. (a) (i) Define friend class and specify its importance. Explain with
suitable example. (8)
(ii) Discuss Virtual function and polymorphism with example. (8)
(b) (i) Explain the concept of inheritance by considering an example of
(ii) Explain the operators used for dynamic memory allocation with
13. (a) (i) Explain Priority Queues and how are binary heaps used in that. (8)
(ii) Explain the properties of heap. (8)
(b) (i) Write a C ++ program to implement Stack and its operations PUSH
and POP. (10)
(ii) What is hashing? Classify hashing functions based on the various
14. (a) (i) Traverse the tree given below using Inorder, Preorder and
Postorder traversals. (10)
(ii) Convert the expression ((A + B) * C - (D - E) ^ (F + G)) to equivalent
Prefix and postfix notations. (6)
(b) (i) Convert the given graph with weighted edges to minimal spanning
(ii) Write a short note on AVL trees. (6)
15. (a) Explain the algorithm of Quicksort by sorting the following set of
numbers as an example:
42 47 52 57 62 37 32 27 22
(b) Describe divide and conquer technique with the help of mergesort. (16)