EC2202 - DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++
MODEL QUESTION PAPER
Total Marks: 100
PART A – (10 X 2 = 20 MARKS)
Answer ALL questions
1. What are the basic concepts of OOS?
2. What are keywords?
3. What are the operators available in C++?
4. Write some of the basic rules for virtual functions
5. Define ADT
6. How do you push and pop elements in a linked stack?
7. What is the minimum number of nodes in an AVL tree of height 5?
8. Define a graph. How it differs from tree?
9. What is the worst case complexity of Quick sort?
10. State the algorithmic technique used in merge sort.
PART B – (5 x 16 = 80 MARKS)
11. (a) What are the basic principles of Object Oriented Programming? Explain with examples, how
they are implemented in C++?
(Or)
(b) What are the different kinds of inheritance? Explain them with suitable examples.
12. Explain how Exception Handling is used achieved in C++? Give 5 different constructs and
explain the working of them. (16)
(Or)
What is operator overloading? Explain binary and unary operator overloading (16)
13. (a) (i) What are the various stack operations? Explain. (6)
(ii) What are the various queue operations? Explain. (5)
(iii) Explain the application of stack for conversion of infix to postfix. (5)
(Or)
(b) (i) What are the advantages and disadvantages of doubly linked list over singly linked list?
Explain the application of doubly linked list. (9)
(ii) Implement any two operations on circular linked list. (7)
14. (a).(i).Discuss and write the program to perform topological sorting.(8)
(ii).What is single source shortest path problem? Discuss Dijikstra’s single source shortest path
algorithm with an example.(8)
(Or)
(b).(i).Write an algorithm to find the minimum cost spanning tree of an undirected, weighted graph.
(8)
(ii) Find the MST for the following graph.(8)
15. (a).(i).Write the routine for sorting n elements in increasing order using heap sort.(8)
(ii).Sort 3,1,4,1,5,9,2,6 in decreasing order using heap sort.(8)
(Or)
(b).(i).Explain with example about the insertion sort.(8)
(ii).What is external sorting? Discuss the algorithms with proper examples.(8)
MODEL QUESTION PAPER
Total Marks: 100
PART A – (10 X 2 = 20 MARKS)
Answer ALL questions
1. What are the basic concepts of OOPs?
2. Define structures and classes?
3. What are copy constructors? Explain with example?
4. Give any four rules for operator overloading?
5. Define double circularly linked list?
6. What are the postfix and prefix forms of the expression?
A+B*(C-D)/(P-R)
7. What are the different types of traversing?
8. What is a balance factor in AVL trees?
9. What is divide and conquer method?
10. What are the steps for pivot selection algorithm?
PART – B (5 X 16 = 80 marks)
11. a) i) Difference between C & C++? (8)
ii) Write down the benefits or advantages of OOPS? (8)
(Or)
b) i) Explain call by reference method using function with example? (6)
ii) Explain briefly about the operator overloading types? (10)
12. a) Explain the class template concept with example?
(Or)
b) Explain about inline function, friend function and virtual function with example?
13. a) Explain the concept of circular linked list with an example code?
(Or)
b) Explain Stack and Queue concept with an example code?
14. a) Explain the concept of Binary Tree traversals with example?
(Or)
b) Expain kruskal’s algorithm with an example?
15. a) Explain Insertion Sort with an example code?
(Or)
b) Explain divide and conquer method with an example code?
MODEL QUESTION PAPER
Total Marks: 100
PART A – (10 X 2 = 20 MARKS)
Answer ALL questions
1. What are primitive data types?
2. Compare the following statement: Break and Continue.
3. What are the functions of new and delete operators?
4. What is the need for friend functions?
5. Define stack.
6. Give the deletion routine for a circular queue
7. What is hashing function?
8. What is the difference between binary tree and binary search tree?
9. Merge sort is better than insertion sort. Why?
10. What is minimum spanning tree? Name any two algorithms used to find MST.
PART B – (5 x 16 = 80 MARKS)
11. a) What is Constructor ?Explain constructor overloading with example program?
(Or)
b) Explain the operators available in C++?
: Scope resolution operator
: : * Pointer-to-member declarator
->* Pointer-to-member operator
.* Pointer-to-member operator
12. a) What is an exception? What are the steps involved in exception handling?
(Or)
b) (i) Explain the types of inheritance with example code? (10)
(ii) Explain the concepts of virtual and abstract base class? (6)
13. a) What are the various list operations? Explain.
(Or)
b)Explain the application of stack for evaluating the postfix expression.
14. a) Give a binary tree representation of the expression (a +b) (c +d ↑e) ↑f .
(or)
b) Explain about AVL Tree in detail with an example
15. a) Write down the merge sort algorithm with an example and give its worst case, best case and
average case analysis.
(or)
b) Write algorithm for weighted and unweighted shortest paths. Explain the above algorithms with
suitable examples.