You are on page 1of 4

Set No.

Code No.:10203
1
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) Explain different storage clauses in C.


b) 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 C-
program to compute and print the first m Fibonacci numbers, where m is the input
to the program.

3.a) Write an Algorithm to enter an element into a queue and remove an element from
the queue.
b) Write an Algorithm for converting the given Infix Expression into post fix with
example.

4.a) Write C-Program to copy the contents of one file into another file.
b) Explain the parameter passing Mechanism in C-Language.

5.a) Explain with an example the Depth First Search and Bredth First Search of a
graph.
b) Write an Algorithm for Bredth First Search of a graph.

6.a) Write an Algorithm for quick sort.


b) How the above algorithm sorts the following key values.
72, 15, 21, 66, 42, 39, 51, 56, 82,10.

7.a) What is a pointer? Write a program using pointers to read in an array of integers
and print its elements in reverse order.
b) Write a program to create a Linear linked list interactively and print out the list.

8. Write short notes on: (a) Heap Sort (b) Circular List.
---
Set No.

Code No.:10203
2
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. Explain the Three Tree Traversal Technique for Binary tree? Give Algorithm for
them.

3.a) Convert the following in fix expression into pre fix A|B ∗ ∗ C+D∗ E - A∗ C
b) Arrange the following elements in an ascending order using Heap sort.
6, 42, 51, 100, 1, 5.

4.a) Write an Algorithm for Depth First Search of a Graph and illustrate with example.
b) Write an Algorithm for selection sort.

5.a) Write an Algorithm for binary search of an array A having N integer elements
for a value called KEY .
b) Write an Algorithm for addition and deletion into a circular queue organized using
array.

6.a) Write a program that will receive a file name and line of text as command line
arguments and write the text to the file.
b) 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.

7.a) Write an Algorithm for deleting a node from a given Doubly linked list.
b) Distinguish between arrays and pointers? What are the advantages of using
pointer over arrays?

8. Short notes on: (a) Structures and Unions (b) Spaning Trees.

---
Set No.

Code No.:10203
3
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) Explain the different conditional statements in C-Language with examples.


b) Write a C-program that reads a positive integer n and prints the factorial of n.

3.a) Distinguish between structures and arrays? Explain the Structure Data type with
example.
b) Write a C program for the multiplication of two M x M matrices A and B.

4.a) Discuss the usage of printer based expressions.


b) Write an Algorithm for converting the given Infix Expression into post fix with
example.

5.a) Distinguish between Stack and Queue? Write a C-program for adding and
deleting items from the stack.
b) Convert the following infix expression into post fix A|B ∗ ∗ C+D ∗ E - A∗ C.

6. What is linked list? Write an Algorithm for create, delete, insert operations.

7.a) Discuss the storage representation of Binary tree?


b) Write recursive functions for in order and post order traversal of Binary tree.

8. Write short notes on: (a) Representation of Graphs (b) linear search.

---
Set No.

Code No.:10203
4
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) Explain different iterative statements in C-Language with examples.


b) Write C-program to merge two sorted arrays.

3.a) Write an Algorithm to create Heap for the given list of elements.
b) Arrange the following elements in ascending order using Heap sort.
46, 6, 100, 5, 1, 98.

4.a) Why Linked list is called Dynamic Data structure? What are the advantages of
using linked list over arrays.
b) Explain the following string Handling functions (i) Str cat (ii) Str cmp (iii) Str
cpy (iv) Str len.

5.a) Explain the General format of fseek and ftell functions.


b) Explain the concept of recursion.

6.a) Write an Algorithm for Binary search.


b) Convert the following infix expression into post fix A|B ∗ ∗ C+D ∗ E - A∗ C.

7. Write an Algorithm for Insertion and Deletion into a Doubly Linked List.

8. Write short notes on: (a) Selection sort. (b) Dequeue.

---

You might also like