You are on page 1of 2

UNIT-III

5. a) Write a C function to find gcd of two numbers using recursion.


Call this function in a main program. 6
b) Give a brief note about different storage classes. What are its
application areas. 6
OR
6. a) Write two C programs to multiply two integer numbers a and b
by means of successive addition using i) iteration and ii)
recursion. 6
b) Write a sample C program to demonstrate the call-by-reference
mechanism. 6
UNIT-IV
7. a) Write a C program to perform row-wise summation of real
valued input matrix. Determine the largest of these row-wise
summation values. Use 2-D and 1-D arrays. 6
b) Give a brief note about the elements in a pointer data type.
What are the advantages and disadvantages of pointers. 6
OR
8. a) Write a C program to find the transpose of a given square
matrix. 6
b) Write a C program to concatenate two input strings using
arrays. 6
UNIT-V
9. a) Write a C program to create a student profile consisting of
name, father name, roll number, marks as a structure.
Determine the student who scored maximum marks. 6
b) List any 3 file handling functions. Explain in detail. 6
OR
10. a) Distinguish between union and structure. Give their
application areas. 6
b) Give a detailed note about unbuffered and buffered files. 6

[1-9/IS/109]
[EURCS 105]
B.Tech. DEGREE EXAMINATION
I SEMESTER
PROGRAMMING WITH C
(Effective from the admitted batch 200809 onwards)
(Common for all branches)
Time: 3 Hours Max.Marks: 60
-----------------------------------------------------------------------------------
Instructions: Each Unit carries 12 marks.
Answer all units choosing one question from each unit.
All parts of the unit must be answered in one place only.
Figures in the right hand margin indicate marks allotted.
-----------------------------------------------------------------------------------
UNIT-I
1. a) Explain why the C programming language is treated as
structural language? 6
b) What is meant by user-defined data type? Give a C program
example which uses user defined data type. 6
OR
2. a) Give a brief note about various operators, and their precedence
and associativity rules. 6
b) List the built-in string I/O operations. Give suitable
C language statement, example one for each string operation. 6
UNIT-II
3. Write a C program to find the largest and second largest number
from the given n numbers, using i) for loop and ii) do-while loop,
without using arrays. 12
OR
4. In an examination of 1000 marks, if a student scores 700 marks or
more, the distinction grade shall be awarded. Similarly more than
599 and less than 700 marks, first class, more than 499 and less
than 600, second class and for other pass students third class is
awarded. Write a C program using i) multiway decision and ii)
switch statements. 12

You might also like