Programming in C N20AE R15 2131
Programming in C N20AE R15 2131
PROGRAMMING IN C
I. Answer any three questions in one or two sentences. Each question carries 2 marks.
PART - B
II Answer any four of the following questions . Each question carries 6 marks.
(Answer any of the three units from the following. Each full question carries 15 marks)
UNIT I
III (a) Write a C program to display the numbers up to a given number in the descending
(b) Differentiate between break and continue statements with example. (6)
OR
IV (a) Write a C program to display the day name in a week when the user inputs
a number in the range 1 to 7 using switch-case statement.
(Hint:If input = 1 display the day as Sunday) (9)
(b) Explain while and do-while loop control structures with example. (6)
UNIT- II
V (a) Explain static and extern storage classes in C with example. (8)
(b) Write a C program to find the sum of numbers from 1 to N using recursion. (7)
OR
(b) Write a C program to find the sum of the digits in a number using function.
Display the result from the main function. (7)
UNIT- III
VII (a) Write a C program to display the elements of an integer array using pointer. (9)
************