Define depth and height of a tree.
DefinitionCS9151 – Programming and Data Structures I
Anna University
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 PDFHow to Use This Question Paper
- Understand the examination pattern.
- Practise questions within the allotted time.
- Identify topics that require further revision.
- Compare with other previous year papers.
More Question Papers
Browse other previous year question papers for this subject.
View All Subject Question PapersQuestion Paper Intelligence
Automatically extracted historical question data. Academic accuracy and examination rules require verification.
Part-wise extracted questions
Question type candidates
Section marks — arithmetic candidates
Examination marks pattern
| Part | Required answers | Marks per answer | Section total |
|---|---|---|---|
| A | 10 | 2 | 20 |
| B | 16 | 5 | 80 |
Optional-choice evidence
Detected alternatives only. Confirm the actual choice rules in the original question paper.
Question navigator
Extracted questions
How are collisions handled while hashing? —
Other Or UnclassifiedDiscuss the efficiency in terms of the number of comparisons in Quick sort. NO = MANSY
Explanationa) i) Explain the various control structures and the different control statements used in ‘C’ with an example code for each. . (10)
Other Or UnclassifiedSource quality review required
a) ii) Differentiate between call by value and-call by reference using suitable example. (6)
Other Or UnclassifiedSource quality review required
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 UnclassifiedSource quality review required
a) ii) Differentiate Array of Pointers and Pointer to an Array with suitable example and syntax. . . 6)
Other Or UnclassifiedSource quality review required
b) i) Write a C program to copy the contents of one file into another. (10)
Other Or UnclassifiedSource quality review required
b) ii) How can the getchar() function be used to read multicharacter strings? (6)
Other Or UnclassifiedSource quality review required
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 UnclassifiedSource quality review required
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 UnclassifiedSource quality review required
b) i)Formulate an ADT to implement cursor with the following routines InitializeCursor(), CursorAloc(), CursorFree(), InsertMidQ), Delete(). (10)
Other Or UnclassifiedSource quality review required
b) ii) Simulate using Stack to convert the infix expression to postfix expression A*(B+D)/E—F*#(G+H/K) (6)
Other Or UnclassifiedSource quality review required
a) i) Formulate'an algorithm for performing insertion and deletion in a binary search tree. (10)
Other Or UnclassifiedSource quality review required
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 UnclassifiedSource quality review required
b) i)Formulate an algorithm to implement open addressing hash table with operations, InitializeTable(), Insert(), Delete() and Find(). (10)
Other Or UnclassifiedSource quality review required
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 UnclassifiedSource quality review required
a) i) Write the algorithm to sort using Mergesort. (10)
Other Or UnclassifiedSource quality review required
a) ii) Show how Heap sort processes the input 15, 75, 10, 80, 21, 35, 23, 8, 12, 7. (6)
Other Or UnclassifiedSource quality review required
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 UnclassifiedSource quality review required
b) ii) Write the algorithm for Shell sort. (6)
Other Or UnclassifiedSource quality review required
Advanced Examination Analysis
Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.