07a1ec01 C Programming and Data Structures
07a1ec01 C Programming and Data Structures
1
I B.Tech Supplimentary Examinations, Aug/Sep 2008
C PROGRAMMING AND DATA STRUCTURES
( Common to Civil Engineering, Electrical & Electronic Engineering,
Electronics & Communication Engineering, Computer Science &
Engineering, Chemical Engineering, Electronics & Instrumentation
Engineering, Bio-Medical Engineering, Information Technology, Electronics
& Control Engineering, Computer Science & Systems Engineering,
Electronics & Telematics, Electronics & Computer Engineering,
Aeronautical Engineering, Instrumentation & Control Engineering and
Bio-Technology)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
1. (a) Write a ‘C’ program to find the squares of N numbers using do - while.
(b) Write a ‘C’ program to convert Decimal Number to Octal Number. [8+8]
2. Write a program using function with argument and with return value to find sum
of odd & even series. [16]
3. Define an array. What are the different types of arrays? Explain. [16]
4. Define Structure and write the general format for declaring and accessing members.
[16]
(a) fseek()
(b) ftell
(c) rewind()
(d) ferror() [16]
6. What are the advantages of external sorting? Write a program to perform merge
sort with following elements
Set A { 11 , 16,22,25 } Set B { 15,19,2,23 } [16]
7. Define stack. What are the different methods used to implement stack, and explain
different operations performed on it. [16]
8. (a) What are the differences between a tree and binary tree?
(b) Give the representation of binary trees and explain. [8+8]
⋆⋆⋆⋆⋆
1 of 1
Code No: 07A1EC01 Set No. 2
I B.Tech Supplimentary Examinations, Aug/Sep 2008
C PROGRAMMING AND DATA STRUCTURES
( Common to Civil Engineering, Electrical & Electronic Engineering,
Electronics & Communication Engineering, Computer Science &
Engineering, Chemical Engineering, Electronics & Instrumentation
Engineering, Bio-Medical Engineering, Information Technology, Electronics
& Control Engineering, Computer Science & Systems Engineering,
Electronics & Telematics, Electronics & Computer Engineering,
Aeronautical Engineering, Instrumentation & Control Engineering and
Bio-Technology)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
3. Write the syntax for declaring two - dimensional array write a program to access
and print the array elements. [16]
4. How to copy one structure to another structure of a same data type, give an ex-
ample? [16]
5. (a) Write the syntax for opening a file with various modes and closing a file.
(b) Explain about file handling functions. [8+8]
6. Write a program to sort the elements whose worst and average case are O(n log n).
[16]
7. What is a singly linked list? Write a program to delete a node in front, rear and
in a particular position and print the list. [16]
8. Write a ‘C’ program to implement recursive algorithm for a Binary Search Tree.
[16]
⋆⋆⋆⋆⋆
1 of 1
Code No: 07A1EC01 Set No. 3
I B.Tech Supplimentary Examinations, Aug/Sep 2008
C PROGRAMMING AND DATA STRUCTURES
( Common to Civil Engineering, Electrical & Electronic Engineering,
Electronics & Communication Engineering, Computer Science &
Engineering, Chemical Engineering, Electronics & Instrumentation
Engineering, Bio-Medical Engineering, Information Technology, Electronics
& Control Engineering, Computer Science & Systems Engineering,
Electronics & Telematics, Electronics & Computer Engineering,
Aeronautical Engineering, Instrumentation & Control Engineering and
Bio-Technology)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
1. How algorithm is different from flowchart? Write an algorithm and draw flowchart
for finding greatest among three given numbers. [8+8]
2. What is a function? What are the different types of functions? Explain function
with no argument and no return type with an example. [16]
3. Define an array. What are the different types of arrays? Explain. [16]
5. (a) Write the syntax for opening a file with various modes and closing a file.
(b) Explain about file handling functions. [8+8]
7. (a) Compare the advantages and disadvantages of doubly linked list over singly
linked list.
(b) Implement a queue using linked list and write a ‘C’ routine to add elements
from a queue. [8+8]
8. Explain about connected and non-connected graph and list the difference between
them? [16]
⋆⋆⋆⋆⋆
1 of 1
Code No: 07A1EC01 Set No. 4
I B.Tech Supplimentary Examinations, Aug/Sep 2008
C PROGRAMMING AND DATA STRUCTURES
( Common to Civil Engineering, Electrical & Electronic Engineering,
Electronics & Communication Engineering, Computer Science &
Engineering, Chemical Engineering, Electronics & Instrumentation
Engineering, Bio-Medical Engineering, Information Technology, Electronics
& Control Engineering, Computer Science & Systems Engineering,
Electronics & Telematics, Electronics & Computer Engineering,
Aeronautical Engineering, Instrumentation & Control Engineering and
Bio-Technology)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆
2. What are the different standard library functions available in ‘C’ ? Explain with a
sample program. [16]
5. (a) Write the syntax for opening a file with various modes and closing a file.
(b) Explain about file handling functions. [8+8]
6. Explain the sorting mechanism which uses the concept of pivot element selection
with a program. [16]
⋆⋆⋆⋆⋆
1 of 1