Write the values of the following expressions a. ‘F ' - ‘C’ b. 2.0+(float)(5/3)
Other Or UnclassifiedSource quality review required
Anna University
| 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 |
Access the previous year question paper for your examination preparation.
View / Download PDFBrowse other previous year question papers for this subject.
View All Subject Question PapersAutomatically extracted historical question data. Academic accuracy and examination rules require verification.
| Part | Required answers | Marks per answer | Section total |
|---|---|---|---|
| A | 10 | 2 | 20 |
| B | 5 | 16 | 80 |
Write the values of the following expressions a. ‘F ' - ‘C’ b. 2.0+(float)(5/3)
Other Or UnclassifiedSource quality review required
What value is assigned to the variable a? #defineN 10+10 a = N*N;
Other Or UnclassifiedSource quality review required
What is the purpose of the fclose() function? Is it mandatory to use this in a program that processes a data file?
DefinitionWhat is the output of the following program. main() { int a=555,*ptr=&a.b=*ptr; , printf(“%d %d %d",++a,-b,*ptr++); ’ ' }
DefinitionSource quality review required
What is an Abstract Data Type?
DefinitionConvert the expression (A+B)/(C/D) into postfix expression and then evaluate it for A=10, B=20,C=15,D=5.
Other Or UnclassifiedSource quality review required
How is the deletion of a node with two children done in a binary search tree?
Other Or UnclassifiedMention a few applications of Hashing.
Short DescriptionUsing Radix Sort, sort [in descending order] the unsorted list {100 0 12 544}
Other Or UnclassifiedSource quality review required
List the advantages of Indexed Sequential Search?
Short Description(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 UnclassifiedSource quality review required
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 UnclassifiedSource quality review required
b. Explain File handling in C with suitable examples. (16)
Other Or UnclassifiedSource quality review required
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 UnclassifiedSource quality review required
b. Explain in detail the various applications of stack. (16)
Other Or UnclassifiedSource quality review required
a Give an overview of the various collision resolution strategies in Hashing along (16) with its advantages and disadvantages.
Other Or UnclassifiedSource quality review required
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 UnclassifiedSource quality review required
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 UnclassifiedSource quality review required
b. What is a Binary Search Tree? Explain in detail the operations on a Binary Search (16) Tree. - 0-
Other Or UnclassifiedSource quality review required
Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.