You are on page 1of 2

www.jntuworld.

com

Code No: C1CS12-C1903

N5

I B.Tech.(CCC) Supplimentary Examinations, June 2009 PROGRAMMING IN C 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) Explain the dierent steps involved in developing a program to solve a given problem. [10] (b) What is a ow chart? Write a ow chart to nd the roots of the quadratic equation ax2 + bx + c = 0. [10] 2. (a) What is the output of the following programs? main () { int x = 2, y = 3, s1, s2 s1 = x + (+ + y) i. 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) ; }

(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. Explain the following string handling functions with an example for each. (a) strupr ( ) (b) strcpy( ) (c) strncmp( ) (d) strcat( ) 4. (a) Dene a le. How does it dier from a structure? [10] [20]

T N

W U

R O

D L

[10]

(b) Write a C program to accept employee information and store it in an output le a emp.rec . [10] 5. (a) Write a C program to draw a circle with 100 pixels radius and ll with red color.

1 of 2

www.jntuworld.com

www.jntuworld.com

Code No: C1CS12-C1903

N5

(b) Explain the role played by initgraph( ) and closegraph( ) functions. [10+10] 6. Explain in detail about the following linked lists: (a) Circular linked list (b) Circular doubly linked list 7. Declare a queue of integers. Write functions (a) to insert an element in to queue (b) to delete an element from queue [20] [20]

8. (a) Write and explain the recursive and non recursive procedure for post order traversal in a binary tree [15] (b) Draw the binary tree and write the preorder traversal by using the following informations Postorder traversal = D E C H F G B A Inorder traversal = F H B G A D C E [5]

T N

W U

R O

D L

2 of 2

www.jntuworld.com

You might also like