You are on page 1of 2

www.jntuworld.

com

Code No: C1CS12-C1903

N5-05

I B.Tech.(CCC) Supplimentary Examinations, June 2008 PROGRAMMING AND DATA STRUCTURES ( Common to Civil Engineering and Mechanical Engineering) Time: 3 hours Max Marks: 100 Answer any FIVE Questions All Questions carry equal marks

1. (a) Enumerate various components of computer and give an example to each. [10] (b) Describe various input and output devices briey. 2. (a) What is the output of the following programs? main () { int x = 2, y = 3, s1, s2 i. s1 = x + (+ + y) s2 = + + x + y + +; printf (%d, %d/n , s1.s2) ; } main () { int a = 2, y = 3, c = 15; a = a&&b||c; ii. c = a||b&&c; printf ( %d, %d, %d\n , a, b, c) ; } [10] [10]

(b) Write a C program to calculate the simple interest on principle amount of Rs. 5000.00 for 3 years at 9% rate of interest. [10] 3. (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 . [10+10] 4. (a) Distinguish between text mode and binary mode operation of a le. [5]

T N

W U

R O

D L

(b) Write a program to open a pre-existing le and add information at the end of le. Display the contents of the le before and after appending. [15] 5. What are the graphics library functions, set of parameters and their type used for the following purpose. (a) Circle drawing (b) Line drawing (c) Polygon drawing with n vertices

1 of 2

www.jntuworld.com

www.jntuworld.com

Code No: C1CS12-C1903 (d) Ellipse drawing

N5-05
[5 4=20]

6. Write a C program to insert and delete the elements from circular doubly linked list. [20] 7. (a) Dene stack write a C program that reverses a string using stack. (b) Write a recursive function that returns the factorial of a given number. [10+10] 8. (a) What is the dierence between binary tree and complete binary tree? [8]

(b) Explain linked representation and threaded tree representation for binary trees. [12]

T N

W U

R O

D L

2 of 2

www.jntuworld.com

You might also like