Set No.

Code No.:10203 I-B.Tech. Supplementary Examinations, December 2002/January 2003 C AND DATA STRUCTURES (Common to Electrical and Electronics Engineering, Electronics and Communication Engineering, Computer Science and Engineering, Computer Science and Information Technology, Electronics and Instrumentation Engineering, Bio-medical Engineering, Electronics and Control Engineering, Electronics and Telematics, Electronics and Computer Engineering and Computer Science and Systems Engineering) Time: 3 hours Max. Marks: 80 Answer any FIVE questions All questions carry equal marks --1.a) What are the basic characteristics of an algorithm? Explain them with an example. b) Give the syntax of the following C construct and explain them. (i) Input-output statement (ii) Case statement (iii) function declaration (iv) Array Declaration. 2.a) b) Explain different storage clauses in C. The Flibonacci series is defined as n0 = 1, n1 = 1 ni+2 = ni+ni+1 for i=0,1,2…… thus the First few Fibonacci numbers are 1,1,2,3,5,8,13… write a complete Cprogram to compute and print the first m Fibonacci numbers, where m is the input to the program. Write an Algorithm to enter an element into a queue and remove an element from the queue. Write an Algorithm for converting the given Infix Expression into post fix with example. Write C-Program to copy the contents of one file into another file. Explain the parameter passing Mechanism in C-Language. Explain with an example the Depth First Search and Bredth First Search of a graph. Write an Algorithm for Bredth First Search of a graph. Write an Algorithm for quick sort. How the above algorithm sorts the following key values. 72, 15, 21, 66, 42, 39, 51, 56, 82,10. What is a pointer? Write a program using pointers to read in an array of integers and print its elements in reverse order. Write a program to create a Linear linked list interactively and print out the list. Write short notes on: (a) Heap Sort (b) Circular List. ---

1

3.a) b) 4.a) b) 5.a) b) 6.a) b) 7.a) b) 8.

Set No.
Code No.:10203 I-B.Tech. Supplementary Examinations, December 2002/January 2003 C AND DATA STRUCTURES (Common to Electrical and Electronics Engineering, Electronics and Communication Engineering, Computer Science and Engineering, Computer Science and Information Technology, Electronics and Instrumentation Engineering, Bio-medical Engineering, Electronics and Control Engineering, Electronics and Telematics, Electronics and Computer Engineering and Computer Science and Systems Engineering) Time: 3 hours Max. Marks: 80 Answer any FIVE questions All questions carry equal marks --1.a) Explain the control statements in C-language. b) Discuss the operations on strings and how they are implemented. 2. 3.a) b) 4.a) b) 5.a) b) 6.a) b) Explain the Three Tree Traversal Technique for Binary tree? Give Algorithm for them. Convert the following in fix expression into pre fix A|B ∗ ∗ C+D∗ E - A∗ C Arrange the following elements in an ascending order using Heap sort. 6, 42, 51, 100, 1, 5. Write an Algorithm for Depth First Search of a Graph and illustrate with example. Write an Algorithm for selection sort. Write an Algorithm for binary search of an array A having N integer elements for a value called KEY . Write an Algorithm for addition and deletion into a circular queue organized using array. Write a program that will receive a file name and line of text as command line arguments and write the text to the file. Write a C-program to read the students marks in 5 subjects as a Two Dimensional array. Also write a functions in the main to calculate average of each student marks and average of each subject marks of all. Write an Algorithm for deleting a node from a given Doubly linked list. Distinguish between arrays and pointers? What are the advantages of using pointer over arrays? Short notes on: (a) Structures and Unions (b) Spaning Trees. ---

2

7.a) b) 8.

Set No.
Code No.:10203 I-B.Tech. Supplementary Examinations, December 2002/January 2003 C AND DATA STRUCTURES (Common to Electrical and Electronics Engineering, Electronics and Communication Engineering, Computer Science and Engineering, Computer Science and Information Technology, Electronics and Instrumentation Engineering, Bio-medical Engineering, Electronics and Control Engineering, Electronics and Telematics, Electronics and Computer Engineering and Computer Science and Systems Engineering) Time: 3 hours Max. Marks: 80 Answer any FIVE questions All questions carry equal marks --1.a) Distinguish between Algorithm and program? Write flow chart to read 20 numbers and for printing the maximum and minimum out of them. b) Explain various Data types in C-Language. 2.a) b) 3.a) b) 4.a) b) 5.a) b) 6. 7.a) b) 8. Explain the different conditional statements in C-Language with examples. Write a C-program that reads a positive integer n and prints the factorial of n. Distinguish between structures and arrays? Explain the Structure Data type with example. Write a C program for the multiplication of two M x M matrices A and B. Discuss the usage of printer based expressions. Write an Algorithm for converting the given Infix Expression into post fix with example. Distinguish between Stack and Queue? Write a C-program for adding and deleting items from the stack. Convert the following infix expression into post fix A|B ∗ ∗ C+D ∗ E - A∗ C. What is linked list? Write an Algorithm for create, delete, insert operations. Discuss the storage representation of Binary tree? Write recursive functions for in order and post order traversal of Binary tree. Write short notes on: (a) Representation of Graphs (b) linear search. ---

3

Set No.
Code No.:10203 I-B.Tech. Supplementary Examinations, December 2002/January 2003 C AND DATA STRUCTURES (Common to Electrical and Electronics Engineering, Electronics and Communication Engineering, Computer Science and Engineering, Computer Science and Information Technology, Electronics and Instrumentation Engineering, Bio-medical Engineering, Electronics and Control Engineering, Electronics and Telematics, Electronics and Computer Engineering and Computer Science and Systems Engineering) Time: 3 hours Max. Marks: 80 Answer any FIVE questions All questions carry equal marks --1.a) What is token? Explain tokens in C-Language. b) What is an operator? Explain different operators in C-Language. 2.a) b) 3.a) b) 4.a) b) 5.a) b) 6.a) b) 7. 8. Explain different iterative statements in C-Language with examples. Write C-program to merge two sorted arrays. Write an Algorithm to create Heap for the given list of elements. Arrange the following elements in ascending order using Heap sort. 46, 6, 100, 5, 1, 98. Why Linked list is called Dynamic Data structure? What are the advantages of using linked list over arrays. Explain the following string Handling functions (i) Str cat (ii) Str cmp (iii) Str cpy (iv) Str len. Explain the General format of fseek and ftell functions. Explain the concept of recursion. Write an Algorithm for Binary search. Convert the following infix expression into post fix A|B ∗ ∗ C+D ∗ E - A∗ C. Write an Algorithm for Insertion and Deletion into a Doubly Linked List. Write short notes on: (a) Selection sort. (b) Dequeue. ---

4