Sei sulla pagina 1di 2

Code No: C1CS10-C1403 NR

I B.Tech(CCC) Supplementary Examinations, May/Jun2007


C PROGRAMMING AND DATA STRUCTURES
(Electronics & Communication Engineering)
Time: 3 hours Max Marks:100
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) What is the conditional operator. What is its general syntax.


(b) Write a C program to find the largest of three input numbers using conditional
operator. [10+10]
2. (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: [10+10]
i) 1 ii) 1
2 2 2 2
3 3 3 3 3 3
4 4 4 4 4 4 4 4
3. (a) Distinguish between the following:
i. Actual and formal arguments.
ii. Global and local variables.
iii. Automatic and static variables.
(b) Explain in detail about pass by values and pass by reference. Explain with a
sample program [10+10]
4. (a) What is a structure? Describe the governing rules for declaring a structure.
(b) Write a C program to prepare marks memo of a class of students using struc-
tures. [8+12]
5. Write a C program to read the input file from command prompt and display the
contents in capital case. [20]

6. Declare a queue of integers. Write functions

(a) To insert an element in to queue


(b) To delete an element from queue [10+10]
7. (a) Construct a binary tree for the following preorder and inorder traversals.
Preorder: ABCDEFGHIJKLMNOPQ
Inorder : DECFBHGAKMLJIORNQP
(b) Explain the tree traversal methods with suitable examples. [10+10]

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 [20]

1 of 2
Code No: C1CS10-C1403 NR
⋆⋆⋆⋆⋆

2 of 2

Potrebbero piacerti anche