Jcs2121 Prog in C QB U4 - New
Jcs2121 Prog in C QB U4 - New
INTRODUCTION
Course Objective – COb4: To develop modular applications in C using functions and Pointers.
PART B
S.No. Question BT
L
1. What is function in C? Explain the steps in writing a function in C program K2
with an example program.
2. a) Classify the function prototypes with example C program for each. K2
(8 marks)
b) Illustrate the difference between user defined and built-in functions. K3
(8 marks)
3. Explain the concept of pass by value and pass by reference. Also write a C K3
program to swap the content of two values using pass by reference.
4. Explain recursive function with syntax and an example program. (8 marks) K2
Write a C program to find the factorial of a number using recursion. (8 marks) K3
5. a) Write a C program to implement tower of Hanoi puzzle. (8 marks) K3
b) Write a C program to reverse a string using recursion. (8 marks) K3
6. a) Explain about pointers and write the use of pointers with suitable example. K2
(8 marks)
b) Create a C program to find the sum of two numbers using pointers. K5
(8 marks)
7. Explain in detail about pointer arithmetic with example. K2
8. Explain and illustrate how an array can be accessed using pointers. (8 marks) K2
Design a C program to find the sum of array elements using pointers. K5
(8 marks)