PREVIOUS YEAR QUESTION PAPER

CS9211 – DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++

Anna University

Regulation 2008 Semester 3 2011

Question Paper Details

University Anna University
Degree B.E. Electronics and Communication Engineering
Department Electronics and Communication Engineering
Regulation Regulation 2008
Semester 3
Subject Code CS9211
Subject Name DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++
Exam Session November / December 2011
Duration 3 Hrs.
Maximum Marks 100

View Question Paper PDF

Access the previous year question paper for your examination preparation.

View / Download PDF

How to Use This Question Paper

More Question Papers

Browse other previous year question papers for this subject.

View All Subject Question Papers

Question Paper Intelligence

Automatically extracted historical question data. Academic accuracy and examination rules require verification.

20Extracted entries
100Maximum marks (metadata)
UnavailableDuration (minutes)
4Choice candidates

Part-wise extracted questions

Part A10
Part B10

Question type candidates

Other Or Unclassified15
Definition3
Short Description1
Diagram1

Section marks — arithmetic candidates

Part A20 marks
Part B80 marks

Examination marks pattern

PartRequired answersMarks per answerSection total
A10220
B51680

Optional-choice evidence

Detected alternatives only. Confirm the actual choice rules in the original question paper.

Part B — Question 12: Option a · Option b
Part B — Question 13: Option a · Option b
Part B — Question 14: Option a · Option b
Part B — Question 15: Option a · Option b

Question navigator

Extracted questions

Part A — 1

List atleast four new operators added by C++ to C which aid OOP.

Short Description
Part A — 2

How does an inline function differ from a preprocessor macro?

Other Or Unclassified
Part A — 3

When do we declare a member of class 'static'? Give example.

Other Or Unclassified
Part A — 4

What is a virtual function? Why do we need virtual functions?

Definition
Part A — 5

Define ADT. Give any two examples.

Definition
Part A — 6

Give the function to delete an item from a dynamic queue.

Other Or Unclassified
Part A — 7

Draw the expression tree for the expression :(a + b * c ) + ( d + e ) + f

Diagram
Part A — 8

What is meant by Rehashing?

Definition
Part A — 9

Give the different ways of representing a Graph with example.

Other Or Unclassified
Part A — 10

Brief with an example the algorithm design technique, Dynamic Programming.

Other Or Unclassified
Part B — 11

i) Assume that a bank maintains two kinds of accounts for customers: the savings account and the current account. The savings account provides compound interest and withdrawal facilities but no cheque book facility. The current account provides cheque book facility but no interest. Current account holders should also maintain a minimum balance and if balance falls below this level, a service charge is imposed. Create a class Account that stores customer name, account number and account type. From this derive Cur-acct and Sav-acct to make them more specific to their requirements. Include necessary member functions in order to achieve the following tasks: [12] a) Accept deposit from a customer and update balance. 1 b) Display the balance. c) Compute and deposit interest. d) Permit withdrawal and update the balance. e) Check for minimum balance, impose penalty if necessary and update the balance.

Other Or Unclassified

Source quality review required

Part B — 11

ii) Illustrate the concept of virtual functions with an example. [4]

Other Or Unclassified

Source quality review required

Part B — 12a

a) Write an application in C++ for matrix addition and multiplication using the following C++ features: (16] (i) Use constructors for initializing the matrix objects. (ii) Use constructors for initializing the resultant matrix to zero. (iii) Use operator overloading member function for matrix addition. (iv) Use friend function for matrix multiplication. (v) Find the sum of the elements of the product matrix using class to basic data type type-conversion.

Other Or Unclassified

Source quality review required

Part B — 12b

b) i) Illustrate with suitable example the different kinds of class type conversions. [8] b) ii) Write a C++ program to copy the contents of an object of dass flowers (name, family, color, number of petais, place of origin) to another object of same class. Also define an operator overloaded function to return the flower object that has more petals. [8]

Other Or Unclassified

Source quality review required

Part B — 13a

a) i) Write an array implementation of self-adjusting lists. A self-adjusting list is like a regular list, except that all insertions are performed at the front, and when an element is accessed by a 'search', it is moved to the front of the list without changing the relative order of the other items. [10] a) ii) Discuss the advantages of linked lists over arrayed lists with suitable examples. [6]

Other Or Unclassified

Source quality review required

Part B — 13b

b) i) Give procedures to perform the stack Push and Pop operations and a third operation Find-min, which returns the smallest element in the data structure. [8] 2 b) ii)Given input { 4371,1323,6173,4199,4344,9679,1989} and a hash function h(X) = X (mod 10), show the resulting: [8] 1. Separate chaining hash table. 2. Open addressing hash table using linear probing. 3. Open addressing hash table using quadratic probing. 4. Open addressing hash table with second hash function h2(X) = 7- (X mod 7)

Other Or Unclassified

Source quality review required

Part B — 14a

a) i) Write functions to perform the following operations on a BST: (5+3] 1. Insertion 2. Findmin a) ii) Construct a BST by inserting 3,1,4,6,9,2,5,7 into an initially empty BST. Show the results of splaying the nodes 1, 6 and 2 one after the other of the constructed BST. [8]

Other Or Unclassified

Source quality review required

Part B — 14b

b) i) Write functions to perform the following operations on a BST: [6+2] 1. Deletion 2. Preorder traversal b) ii) Show the result of inserting 2, 1, 4, 5, 9, 3, 6, 7 in to an initially empty AVL tree. [8]

Other Or Unclassified

Source quality review required

Part B — 15a

a) i) Explain how the Dijkstra's Algorithm uses the Greedy algorithm design technique in finding the single source shortest path of the graph of fig. 1 5 - a . (8] Fig - 15-a 3 a) ii) Write a function for shell sort and illustrate using the following list of numbers: 81, 94, 11, 96,12, 35,17, 95, 28, 58 [8]

Other Or Unclassified

Source quality review required

Part B — 15b

b) i) Define divide and conquer algorithm. Explain with an example any sorting algorithm that uses divide and conquer approach. {8] b) ii) Explain the Prim's algorithm to find the Minimum Spanning tree for the graph of fig. 15 - b . [8] 6 6 Fig - 15-b 4

Other Or Unclassified

Source quality review required

Advanced Examination Analysis

Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.