Вы находитесь на странице: 1из 7

www.andhracolleges.

com The Complete Information About Colleges in Andhra Pradesh

Code No: R059010104 Set No. 1


I B.Tech Regular Examinations, May/Jun 2006
C’ PROGRAMMING & DATA STURCTURES
( Common to Civil Engineering, Electrical & Electronic Engineering,
Electronics & Communication Engineering, Computer Science &
Engineering, Electronics & Instrumentation Engineering, Bio-Medical
Engineering, Information Technology, Electronics & Control Engineering,
Computer Science & Systems Engineering, Electronics & Telematics,

www.andhracolleges.com
Electronics & Computer Engineering, Aeronautical Engineering and
Instrumentation & Control Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) What is the difference between signed integer and unsigned integer in terms
of memory and range.
(b) List the entire data types in C. What is the size of each of these data types.
[8+8]
2. (a) Distinguish between getchar and scanf functions for reading strings.
(b) Write a program to count the number of words, lines and characters in a text.
[8+8]
3. (a) What is a pointer? List out the reasons for using pointers.
(b) Write a C Program to illustrate the use of indirection operator “ * ” to access
the value pointed by a pointer. [8+8]

www.andhracolleges.com
4. Write a C program to read the information from the keyboard in which the “Em-
ployee” structure consists of employee name, code, designation and salary. Con-
struct an array of structures that stores n employees information and write a pro-
gram to carry out operations like inserting a new entry, deleting entry. [16]
5. (a) Explain the command line arguments. What are the syntactic constructs
followed in C.
(b) Write a C program to read the input file from command prompt, using com-
mand line arguments. [16]
6. Define a data structure. What are the different types of data structures? Explain
each of them with suitable example. [4+6+6]
7. Write a C program to insert and delete the elements from circular doubly linked
list. [16]
8. (a) Write a C program to search for a given element in the integer array using
binary search.
(b) Derive the time complexity of binary search. [8+8]

⋆⋆⋆⋆⋆
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
USA-UK-Australia-Germany-France-NewZealand Universities List
1 of 1
www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information
www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R059010104 Set No. 2


I B.Tech Regular Examinations, May/Jun 2006
C’ PROGRAMMING & DATA STURCTURES
( Common to Civil Engineering, Electrical & Electronic Engineering,
Electronics & Communication Engineering, Computer Science &
Engineering, Electronics & Instrumentation Engineering, Bio-Medical
Engineering, Information Technology, Electronics & Control Engineering,
Computer Science & Systems Engineering, Electronics & Telematics,

www.andhracolleges.com
Electronics & Computer Engineering, Aeronautical Engineering and
Instrumentation & Control Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. Write about space requirements for variables of different data types. [16]

2. The annual examination is conducted for 50 students for three subjects. Write a
program to read the data and determine the following:

(a) Total marks obtained by each student.


(b) The highest marks in each subject and the Roll No. of the student who secured
it.
(c) The student who obtained the highest total marks. [5+6+5]

3. (a) Explain the way of defining, opening and closing a file. Also explain the
different modes of operation.

www.andhracolleges.com
(b) Write a C program to read data from the keyboard, write it to a file called
INPUT, again read the same data from the INPUT file, and display it on the
screen. [8+8]

4. (a) Distinguish between an array of structures and an array within a structure.


Give an example each.
(b) Write a C program using structure to create a library catalogue with the
following fields; Access number, author’s name. Title of the book, year of
publication, publisher’s name, price. [6+10]

5. Write a C program to read information about the student record containing stu-
dent’s name, student’s age and student’s total marks. Write the marks of each
student in an output file. [16]

6. Write a C program for implementation of various operations on circular queue. [16]

7. Circular linked lists are usually set up with so-called list header. What is the reason
for introducing such a header? Write fucntions to insert and delete elements for
this implementation. [4+12]

8. (a) Explain the algorithm for exchange sort with a suitable example.
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R059010104 Set No. 2


(b) Compare sort and exchange sort [8+8]

⋆⋆⋆⋆⋆

www.andhracolleges.com

www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R059010104 Set No. 3


I B.Tech Regular Examinations, May/Jun 2006
C’ PROGRAMMING & DATA STURCTURES
( Common to Civil Engineering, Electrical & Electronic Engineering,
Electronics & Communication Engineering, Computer Science &
Engineering, Electronics & Instrumentation Engineering, Bio-Medical
Engineering, Information Technology, Electronics & Control Engineering,
Computer Science & Systems Engineering, Electronics & Telematics,

www.andhracolleges.com
Electronics & Computer Engineering, Aeronautical Engineering and
Instrumentation & Control Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) What is the purpose of break statement?


(b) Suppose a break statement is included within the innermost of several nested
control statements. What happens when break statement is executed?
(c) Write a program to print the multiplication table upto to with proper format.
[4+6+6]

2. (a) Write a program to demonstrate passing an array argument to a function.


Consider the problem of finding largest of N numbers defined in an array.
(b) Write a recursive function power (base, exponent) that when invoked returns
base exponent. [8+8]

3. The roots of a quadratic equation of the form ax2 +bx+c = 0 are given by the

www.andhracolleges.com
following equations: p
X1 = −b + (b2 − 4ac)/2a
p
X2 = −b − (b2 − 4ac)/2a
Write a function to calculate the roots. The function must use two pointer para-
meters, one to receive the coefficients a,b and c and the other to send the roots to
the calling function. [16]

4. (a) Write a program to create an array of student structure objects and to find
the highest marks scorer. The fields in the student structure are: name, age
and marks.
(b) How are structure elements stored in memory. [10+6]

5. Write a program to read a C program file and count the following in the complete
C program

(a) Total number of statements


(b) Total number of opening brackets. [8+8]

6. Write a C program for implementation of various operations on circular queue. [16]


Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R059010104 Set No. 3


7. Represent a doubly linked list using an array. Write routines to inset and delete
elements for this representation. [16]

8. Write an algorithm for two-way merge sort. Analyse its time complexity . [8+8]

⋆⋆⋆⋆⋆

www.andhracolleges.com

www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R059010104 Set No. 4


I B.Tech Regular Examinations, May/Jun 2006
C’ PROGRAMMING & DATA STURCTURES
( Common to Civil Engineering, Electrical & Electronic Engineering,
Electronics & Communication Engineering, Computer Science &
Engineering, Electronics & Instrumentation Engineering, Bio-Medical
Engineering, Information Technology, Electronics & Control Engineering,
Computer Science & Systems Engineering, Electronics & Telematics,

www.andhracolleges.com
Electronics & Computer Engineering, Aeronautical Engineering and
Instrumentation & Control Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) What is meant by operator precedence? What are the relative precedence of
the arithmetic operators?
(b) What is the associativity of the arithmetic operators?
(c) How can the value of an expression be converted to a different data types?
What is this called?
(d) What are unary operators? Explain example for each. [4+4+4+4]

2. (a) In what way array is different from an ordinary variable?


(b) What conditions must be satisfied by the entire elements of any given array?
(c) What are subscripts? How are they written? What restrictions apply to the

www.andhracolleges.com
values that can be assigned to subscripts?
(d) What advantage is there in defining an array size in terms of a symbolic
constant rather than a fixed integer quantity?
(e) Write a program to find the largest element in an array. [3+2+3+3+5]

3. (a) Write a ‘C’ Program to compute the sum of all elements stored in an array
using pointers.
(b) Write a ‘C’ program using pointers to determine the length of a character
string. [8+8]

4. (a) Explain the different ways of passing structure as arguments in functions.


(b) Write a C program to illustrate the method of sending an entire structure as
a parameter to a function. [8+8]

5. (a) Distinguish between text mode and binary mode operation of a file.
(b) Write a program to open a pre-existing file and add information at the end of
file. Display the contents of the file before and after appending. [4+12]

6. Write a C program using pointers to implement a stack with all the operations.[16]

Seminar Topics - Scholarships - Admission/Entrance Exam Notifications


1 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information


www.andhracolleges.com The Complete Information About Colleges in Andhra Pradesh

Code No: R059010104 Set No. 4


7. Write a routine SPLIT() to split a singly linked list into two lists so that all elements
in odd position are in one list and those in even position are in another list. [16]

8. Write a C program to sort a given list of elements using tree sort and discuss its
time complexity. [16]

⋆⋆⋆⋆⋆

www.andhracolleges.com

www.andhracolleges.com
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
2 ofUSA-UK-Australia-Germany-France-NewZealand
2 Universities List

www.andhracolleges.com Engineering-MBA-MCA-Medical-Pharmacy-B.Ed-Law Colleges Information

Вам также может понравиться