Você está na página 1de 7

www.andhracolleges.

com The Complete Information About Colleges in Andhra Pradesh

Code No: R05010106 Set No. 1


I B.Tech Supplimentary Examinations, Aug/Sep 2007
C’ PROGRAMMING AND DATA STRUCTURES
( 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. (a) What do you mean by functions? Give the structure of the functions and
explain about the arguments and their return values.
(b) Write a C program that uses a function to sort an array of integers. [8+8]
3. (a) What is a pointer? How is a pointer initiated? Give an example.
(b) State whether each of the following statements is true or false. Give reasons.
i. An integer can be added to a pointer.
ii. A pointer can never be subtracted from another pointer.
iii. When an array is passed as an argument to a function, a pointer is passed.
iv. Pointers can not be used as formal parameters in headers to function

www.andhracolleges.com
definitions.
(c) If m and n have been declared as integers and p1 and p2 as pointers to integers,
then find out the errors, if any, in the following statements.
i. p1 = &m;
ii. p2 = n;
iii. m=p2-p1;
iv. *p1 = &n; [4+6+6]
4. (a) Explain with an example how a structure can be organized in the ‘C’ language?
(b) Write a C program to print maximum marks in each subject along with the
name of the student by using structures. Take 3 subjects and 3 students
records. [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. Declare a circular queue of integers such that F points to the front and R points to
the rear. Write functions
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: R05010106 Set No. 1


(a) To insert an element into queue
(b) To delete an element from queue. [8+8]

7. What is meant by linked list? What are the advantages and disadvantages in using
linked lists? [16]

8. (a) Write a C program to search for a given element in the integer array using

www.andhracolleges.com
binary search.
(b) Write a C program to sort the elements of an array using tree sort method
with suitable example. [8+8]

⋆⋆⋆⋆⋆

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: R05010106 Set No. 2


I B.Tech Supplimentary Examinations, Aug/Sep 2007
C’ PROGRAMMING AND DATA STRUCTURES
( 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) Write a program to determine and print the sum of the following harmonic
series for a given value of n:
1+1/2+1/3+.....+1/n.
(b) What are the logical operators used in C and illustrate with examples. [8+8]
2. (a) What do you mean by functions? Give the structure of the functions and
explain about the arguments and their return values.
(b) Write a C program that uses a function to sort an array of integers. [8+8]
3. (a) Explain the process of accessing a variable through its pointer. Give an Ex-
ample.
(b) Write a C program using pointers to read in an array of integers and print its
elements in reverse order. [8+8]

www.andhracolleges.com
4. (a) Explain the advantages of structure type over the array type variable.
(b) Define a structure that represent a complex number (contains two floating-
point members, called real and imaginary). Write a C program to add, sub-
tract, and multiply two complex numbers.
5. Write a C program to read a text file and to count
(a) number of characters,
(b) number of words and
(c) number of sentences and write in an output file.
[6+10]

[16]
6. Write a non-recursive simulation of Towers of Hanoi problem. [16]
7. Explain non-recursive and recursive algorithm for Postorder traversal of binary
tree. [16]
8. Trace through the steps by hand to sort the following list in Quick sort.
28 7 39 3 63 13 61 17 50 21 [16]

⋆⋆⋆⋆⋆
Seminar Topics - Scholarships - Admission/Entrance Exam Notifications
1 ofUSA-UK-Australia-Germany-France-NewZealand
1 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: R05010106 Set No. 3


I B.Tech Supplimentary Examinations, Aug/Sep 2007
C’ PROGRAMMING AND DATA STRUCTURES
( 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 looping? Describe any two different forms of looping with
examples.
(b) Write a program to print the following outputs using for loops: [8+8]
i) 1 ii) 1
2 2 2 2
3 3 3 3 3 3
4 4 4 4 4 4 4 4

2. (a) Distinguish between user defined and built-in functions.


(b) What is meant by function prototype. Give an example function prototype.
[8+8]

www.andhracolleges.com
3. (a) Explain the process of accessing a variable through its pointer. Give an Ex-
ample.
(b) Write a C program using pointers to read in an array of integers and print its
elements in reverse order. [8+8]

4. (a) How to compare structure variables? Give an example.


(b) Define a structure type struct ABS, that contains name, age, designation,
and salary. Using this structure, write a C program to read this information
for one person from the keyboard and print the same on the screen. [6+10]

5. (a) Write a C program to read last ‘n’ characters of the file using appropriate file
function.
(b) Write a C program to read a text file and convert the file contents in capital
(upper-case) and write the contents in a output file. [16]

6. Write an algorithm to convert the infix expression into postfix expression. [16]

7. Write a C program to create a linear linked list interactively and to print out the
list and the total number of items in the list. [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: R05010106 Set No. 3


8. Write in detail about the following:

(a) Exchange sort


(b) Binary search [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: R05010106 Set No. 4


I B.Tech Supplimentary Examinations, Aug/Sep 2007
C’ PROGRAMMING AND DATA STRUCTURES
( 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. (a) Write a program to sort the set of strings in an alphabetical order?


(b) How are multidimensional arrays defined? Compare with the manner in which
one-dimensional arrays are defined. [10+6]

3. (a) Explain the process of accessing a variable through its pointer. Give an Ex-
ample.
(b) Write a C program using pointers to read in an array of integers and print its
elements in reverse order. [8+8]

4. (a) Differentiate between a structure and union with respective allocation of mem-

www.andhracolleges.com
ory by the compiler. Given an example of each.
(b) Write a program to read n records of students and find out how many of them
have passed. The fields are student’s roll no, name, mark and result. Evaluate
the result as follows
if markes > 35 then
Result = “Pass” else “Fail”
[6+10]

5. Write a C program to replace every 5th character of the data file, using fseek( )
command. [16]

6. Declare a queue of integers. Write functions

(a) To insert an element in to queue


(b) To delete an element from queue [8+8]

7. (a) Define graph. Explain the properties of a graph.


(b) What is the difference between strongly connected graph and weakly connected
graph? [8+8]
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: R05010106 Set No. 4


8. Write in detail about the following:

(a) Selection sort


(b) Heap 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

Você também pode gostar