SUBJECT QUESTION PAPER COLLECTION

CS9151 – Programming & Data Structures - I

Anna University

B.E. Computer Science and Engineering Computer Science and Engineering Regulation 2008 Semester 2
2 Question Papers
2012 Earliest Year
2013 Latest Year

📚 Previous Year Question Papers

2 question papers available. Select an examination session to view its question paper.

PDF

April / May 2013

Programming & Data Structures - I

PDF

May June 2012

Programming and Data Structures I

Historical Examination Intelligence

Based on available extracted papers. Question groups and frequency are provisional, not official syllabus weightage or examination predictions.

2Source papers
2Papers with questions
30Question occurrences
30Distinct question candidates
0Exact repeat candidates
100.0%Extraction coverage

Papers by examination year

20121
20131

Question type candidates

Other Or Unclassified25
Definition4
Explanation1

Detected examination patterns

A+B2

Search historical questions

Define depth and height of a tree.

1 eligible source papers

How are collisions handled while hashing? —

1 eligible source papers

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

1 eligible source papers

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

0 eligible source papers

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

0 eligible source papers

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)

0 eligible source papers

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

0 eligible source papers

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

0 eligible source papers

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

0 eligible source papers

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

0 eligible source papers

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)

0 eligible source papers

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

0 eligible source papers

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

0 eligible source papers

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

0 eligible source papers

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)

0 eligible source papers

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

0 eligible source papers

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)

0 eligible source papers

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

0 eligible source papers

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

0 eligible source papers

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)

0 eligible source papers

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

0 eligible source papers

Brief on the rules to follow on naming variables.

1 eligible source papers

Write the output of the following code: # include <stdio.h> int func() { static int a = 10; return at+; } main() _ printf(‘\nFirst call : %d”, func()); printf(“\nSecond call : %d”, func()); return 0; } What are the advantages of preprocessors?

0 eligible source papers

Write a code snippet that reads the elements of a n x m matrix using a pointer variable.

1 eligible source papers

Is linked list is better than an arrayed list? Give atleast two reasons for your answer. |

1 eligible source papers

Give the postfix notation of the expression:a*((o*c+d)/(e-f*g)).

1 eligible source papers

What are binary search trees? Give an example.

1 eligible source papers

What are min-heap and max-heap? 109. Sort the following numbers using Insertion sort. 9523 26 1 4 53 46 8 17

0 eligible source papers

i) Write a function to reverse a string and use this function to check whether the user given string is a palindrome. (10) ii) What are the components of a recursive function? Give a recursive function to find a factorial of a number. ்‌ (6) 12. 13. 14, 15. b) a) b) a) b) b) Write a program to store the voter's information such as voter-id, name, father name, date-of-birth, age, gender, address and ward—no for ‘n’ voters. Also write functions - to compute the number of male and female voters of a ward ‘w’; - to display the information of each voter using pointer. (16) . OR ப Write a program to create a file; read and display the contents of the file; inserting a string at position ‘n’ from the end of the file and finally displaying the whole content of the file. | (46) i)-Define C functions to evaluate a postfix expression using stack operations. (8) ii) Given two sorted linear linked lists L1 and L2, how do you create a list L3, . which consists of the uncommon elements of L1 and L2? Write a suitable ADT for the construction of doubly linked list L3. (8) . OR i) Write ADTs for insert and delete operations in a Circular Queue using singly linked list. | 7 (8) ii) Write a C program to convert an infix expression into a prefix expression (8) i) Write suitable ADT’s to perform insertion and deletion operations in Binary Search Tree. (8) ii) Simulate the result of inserting: 61, 32, 36, 14, 6, 75, 82, 3, 19, 87, 94 one at a time, into an initially empty binary search tree. (4) iii) Simulate the deletion of the elements 36, 87, 61, 75 one by one from the above binary search tree. . | (4) [OR] Explain the collision.resolving schemes in hashing with proper illustrations. (16) i) Explain Heap sorting of data with suitable example. . (10) ii) Arrange the following numbers in ascending order using Merge Sort. 49 58 25 63 4 14 78 96 8 10 2 43 (6) [OR] i) Explain Quick Sort in detail by arranging the following set of numbers. Write suitable routines to illustrate Quick sort operations. 56 67 20 98 134 142 69 34 12 46 52 . (10) ii) Explain Replacement Selection algorithm with a suitable example. (6)

0 eligible source papers

Advanced Examination Analysis

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