Lab 6 Functions and Recursive Functions
Lab 6 Functions and Recursive Functions
Subject: C Programming
Faculty: BCT+BEL Prepared By: Subash Panday
Lab-6: Functions and Recursive Functions
Objectives: To be familiar with user defined function and the use recursive function to solve a
problem.
Related Theory:
Lab Task:
1. WAP to calculate simple interest.
2. WAP to calculate area and circumference of circle.
3. WAP to calculate volume, TSA and CSA of cylinder.
4. WAP to input any number and display it in reverse order.
5. WAP to check whether the given number is palindrome or not.
6. WAP to calculate HCF of any two numbers.
7. WAP to evaluate the given series:-
a. 1+4+9+16+...+n^2
b. 1+1/8+1/27+.....+1/n^3
c. 1,11,111,1111,11111,......n terms
d. 1+2/2!+3/3!+.....+ n/n!
e. 1+x/1! + x^2/ 2! + x^3/3!+…….x^n /n!
8. WAP to calculate the factorial of input number using recursive function.
9. WAP to generate the Fibonacci series using recursive function.
10.WAP to find the sum of a digit of input number using recursive function.
11.WAP to evaluate the following series using recursion:-
a. 1+ 2/2! +3/3!+…………………….n/n!
b. x+x^2+x^3+………………..x^n