PREVIOUS YEAR QUESTION PAPER

IT8202 – PROGRAMMING AND DATA STRUCTURES I

Anna University

Regulation 2012 Semester 2 2013

Question Paper Details

University Anna University
Degree B.Tech. Information and Technology
Department Information and Technology
Regulation Regulation 2012
Semester 2
Subject Code IT8202
Subject Name PROGRAMMING AND DATA STRUCTURES I
Exam Session April / May 2013
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.

19Extracted entries
100Maximum marks (metadata)
UnavailableDuration (minutes)
0Choice candidates

Part-wise extracted questions

Part A10
Part B9

Question type candidates

Other Or Unclassified14
Definition3
Short Description2

Section marks — arithmetic candidates

Part A20 marks
Part B80 marks

Examination marks pattern

PartRequired answersMarks per answerSection total
A10220
B51680

Question navigator

Extracted questions

Part A — 1

Write the values of the following expressions a. ‘F ' - ‘C’ b. 2.0+(float)(5/3)

Other Or Unclassified

Source quality review required

Part A — 2

What value is assigned to the variable a? #defineN 10+10 a = N*N;

Other Or Unclassified

Source quality review required

Part A — 3

What is the purpose of the fclose() function? Is it mandatory to use this in a program that processes a data file?

Definition
Part A — 4

What is the output of the following program. main() { int a=555,*ptr=&a.b=*ptr; , printf(“%d %d %d",++a,-b,*ptr++); ’ ' }

Definition

Source quality review required

Part A — 5

What is an Abstract Data Type?

Definition
Part A — 6

Convert the expression (A+B)/(C/D) into postfix expression and then evaluate it for A=10, B=20,C=15,D=5.

Other Or Unclassified

Source quality review required

Part A — 7

How is the deletion of a node with two children done in a binary search tree?

Other Or Unclassified
Part A — 8

Mention a few applications of Hashing.

Short Description
Part A — 9

Using Radix Sort, sort [in descending order] the unsorted list {100 0 12 544}

Other Or Unclassified

Source quality review required

Part A — 10

List the advantages of Indexed Sequential Search?

Short Description
Part B — 11

(i) The following is the skeleton of a C program that computes the number of-each (10) numeral in a string. Fill in the blanks with appropriate C constructs. #include <stdio.h> #define base 10 main () /* This program outputs the numbers of 0's,1's, ; ; ;, 9's in an input string ending in $ 7 { ... char b; int i, a[basej; /* Initialize array elements to zero 7 for ( ________ :____________ :_____________ ) a[i] = 0; printf("lnput numeric characters ending with $\n"); scanf("%c", &b); /* Scan next character 7 /* Execute the loop as long as $ is not scanned */ while ( ) { printf("Processing the digit %c\n", b); /* Increment the count for the new digit */ a [ _ ] : scanf("%c", &b); /* Scan next character */ } for ( i=0 ; i<=9 ; i=i+1 ) printf("There are % % ’s\n", a[i], i); } (ii) Write a function conv_cap that takes a character string of arbitrary length as its (6) input parameter and converts all the alphabets in the string to capital. Do not use any string or character library function.

Other Or Unclassified

Source quality review required

Part B — 12

a. (i) Declare a global array named studArr consisting of 600 student structures, (8) where each structure student has the following members: Name: string of 10 characters, Address: string of 20 characters, Roll_number: integer, CGPA: float. Write the code to read the student data for 600 students from terminal. Through call to the function conv_cap (Q.11 (ii) of the previous question) convert the names of all students to uppercase and print those names. (ii) With suitable examples differentiate Structures and Union (8)

Other Or Unclassified

Source quality review required

Part B — 12OR

b. Explain File handling in C with suitable examples. (16)

Other Or Unclassified

Source quality review required

Part B — 13

a. (i) Write C functions for implementing the following stack operations. (12) • init - which constructs and returns an empty stack (2) • empty - which returns a value indicating whether a given stack is empty or not (2) • Push - which pushes a given integer onto a given stack. (4) • top - which returns the top element of a given stack. (2) • Delete - which deletes the top element of a given stack. (2) (ii) Give prototypes for the following functions on a queue of jobs (no need to write the function bodies. (4) • empty - which returns a value indicating whether a given queue is empty or not. • enqueue - which puts a given job in a given queue, • front - which returns the job from the front of a given queue if the queue is not empty; otherwise it returns a job with a negative identification number, • dequeue - which deletes the front of a given queue.

Other Or Unclassified

Source quality review required

Part B — 13OR

b. Explain in detail the various applications of stack. (16)

Other Or Unclassified

Source quality review required

Part B — 14

a Give an overview of the various collision resolution strategies in Hashing along (16) with its advantages and disadvantages.

Other Or Unclassified

Source quality review required

Part B — 14OR

b. i) Write a ‘C’ function to count the number of leaves in a binary tree, (10) ii) What are applications of trees. (6)

Other Or Unclassified

Source quality review required

Part B — 15

a. What is Heapsort ? Apply heapsort on the given data. (18) 11 2 7 8 12 17 8 4 10 2 Show the steps involved.

Other Or Unclassified

Source quality review required

Part B — 15OR

b. What is a Binary Search Tree? Explain in detail the operations on a Binary Search (16) Tree. - 0-

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.