Reg. No. : | LC]
Question Paper Code : 30115
B.E/B.Tech. DEGREE EXAMINATIONS, APRIL/MAY 2023.
Second Semester
Computer Science and Engineering
CS 8251 - PROGRAMMING IN C
(Common to; Computer and Communication Engineering/Information Technology)
(Regulations 2021)
‘Time : Three hours Maximum : 100 marks
10.
u.
Answer ALL questions.
PART A— (10 x 2= 20 marks)
Draw the structure of C program.
What is the purpose of format specifier in /O statements? Give an example.
Write down the syntax and give an example for array initialization.
How to identify the length of a string?
What is the function prototype? Give an example.
What are the difference between user defined functions and built-in functions?
What do you mean by self-referential structure?
What is unique about the storage class ‘register’?
Describe the prototype of the function fopend).
List the various modes of accessing a file through C.
PART B— (5 x 16 = 80 marks)
(@) Explain the various data types being supported by C language. (16)
Or
(>) Explain about the various looping statements available in
appropriate sample programs. (6)13.
14,
15.
(a)
(b)
(a)
(b)
@)
oo
(@)
(b)
G@) ~~ What is an array? Explain about one dimensional array with a
sample program @)
(ii) Write about the significance of header file, ‘string.h’ and write short
notes on any three string functions. 8)
Or
Write and explain the procedure for selection sort. @
(i) Write a C program to demonstrate matrix addition. @)
Write short notes on the following:
(function prototype and function call ®
(i) function definition and return value (8)
Or
Enumerate the difference between call by value and call by reference
with suitable examples. (16)
(i) Explain the need for nested structures with appropriate example
program. @)
Gi) Can a linked list grow dynamically? Justify your answer with
example C program @)
Or
(With suitable diagram, explain the concept of singly linked list. (8)
(i) Enumerate the difference between structure and union with
example. @)
How does random accessing of files are done in C language? Explain in
detail. (16)
Or
What is the purpose of the variables arge and argv of command line
arguments in C language? Explain with a sample program. (a8)
2 30115