PREVIOUS YEAR QUESTION PAPER

CS9151 – Programming and Data Structures I

Anna University

Regulation 2008 Semester 2 2012

Question Paper Details

University Anna University
Degree B.E. Computer Science and Engineering
Department Computer Science and Engineering
Regulation Regulation 2008
Semester 2
Subject Code CS9151
Subject Name Programming and Data Structures I
Exam Session May June 2012
Duration Three hours
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.

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

Part-wise extracted questions

Part A3
Part B18

Question type candidates

Other Or Unclassified19
Definition1
Explanation1

Section marks — arithmetic candidates

Part A20 marks
Part B80 marks

Examination marks pattern

PartRequired answersMarks per answerSection total
A10220
B16580

Optional-choice evidence

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

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

Question navigator

Extracted questions

Part A — 8

Define depth and height of a tree.

Definition
Part A — 9

How are collisions handled while hashing? —

Other Or Unclassified
Part A — 10

Discuss the efficiency in terms of the number of comparisons in Quick sort. NO = MANSY

Explanation
Part B — 11a

a) i) Explain the various control structures and the different control statements used in ‘C’ with an example code for each. . (10)

Other Or Unclassified

Source quality review required

Part B — 11a

a) ii) Differentiate between call by value and-call by reference using suitable example. (6)

Other Or Unclassified

Source quality review required

Part B — 12a

a) i) Write a C program that reads several different names and addresses into the computer, rearranges the names into alphabetical order, and then writes out the alphabetized list. Make use of structure variables within the program. (10)

Other Or Unclassified

Source quality review required

Part B — 12a

a) ii) Differentiate Array of Pointers and Pointer to an Array with suitable example and syntax. . . 6)

Other Or Unclassified

Source quality review required

Part B — 12b

b) i) Write a C program to copy the contents of one file into another. (10)

Other Or Unclassified

Source quality review required

Part B — 12b

b) ii) How can the getchar() function be used to read multicharacter strings? (6)

Other Or Unclassified

Source quality review required

Part B — 13a

a) i) Formulate an algorithm to perform an insertion in a singly linked list in an increasing order of their INFO field. (10)

Other Or Unclassified

Source quality review required

Part B — 13a

a) ii) A circular queue has a size of 5 and has 3 elements 10, 20 and 40 where F=2 and R=4. After inserting 50 and 60, what is the value of F and R. Trying to insert 30 at this stage what happens. Delete 2 elements from the queue and insert 70 ,80 & 90. - Show the sequence of steps with necessary diagrams with the value of F & R. (6) — (OR)

Other Or Unclassified

Source quality review required

Part B — 13b

b) i)Formulate an ADT to implement cursor with the following routines InitializeCursor(), CursorAloc(), CursorFree(), InsertMidQ), Delete(). (10)

Other Or Unclassified

Source quality review required

Part B — 13b

b) ii) Simulate using Stack to convert the infix expression to postfix expression A*(B+D)/E—F*#(G+H/K) (6)

Other Or Unclassified

Source quality review required

Part B — 14a

a) i) Formulate'an algorithm for performing insertion and deletion in a binary search tree. (10)

Other Or Unclassified

Source quality review required

Part B — 14a

a) ii) Make a BST for the following sequence of numbers. 45, 36, 76, 23, 89, 115, 98, 39, 41, 56, 69, 48 Traverse the tree in Preorder, Inorder and Postorder. . (6)

Other Or Unclassified

Source quality review required

Part B — 14b

b) i)Formulate an algorithm to implement open addressing hash table with operations, InitializeTable(), Insert(), Delete() and Find(). (10)

Other Or Unclassified

Source quality review required

Part B — 14b

b) ii) Consider inserting the keys 10, 22, 31, 4, 15, 28, 17, 88, 59 into a-hash table of length m = 11 using open addressing with the primary hash function h'(k)=k . mod m. Illustrate the result of inserting these keys using linear probing, using quadratic and using double hashing with h2(k)=1+(kmod(m-1)). (6)

Other Or Unclassified

Source quality review required

Part B — 15a

a) i) Write the algorithm to sort using Mergesort. (10)

Other Or Unclassified

Source quality review required

Part B — 15a

a) ii) Show how Heap sort processes the input 15, 75, 10, 80, 21, 35, 23, 8, 12, 7. (6)

Other Or Unclassified

Source quality review required

Part B — 15b

b) i) Sort the data 81, 94, 11, 96, 12, 35, 17, 99, 28, 58, 41, 75, 15 using external sorting algorithms. Show the steps to generate extended initial runs using Replacement Selection strategy. (10)

Other Or Unclassified

Source quality review required

Part B — 15b

b) ii) Write the algorithm for Shell sort. (6)

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.