Top 10 C Programs & Answers

11.Write a program to generate the Fibonacci series.
Fibonacci series: Any number in the series is obtained by adding the previous two
numbers of the series.
Let f(n) be n'th term.
f(0)=0;
f(1)=1;
f(n)=f(n-1)+f(n-2); (for n>=2)
Series is as follows

Top 10 C programs and Answers

Write a program to find factorial of the given number.

1.

Recursion: A function is called 'recursive' if a statement within the body of a
function calls the same function. It is also called 'circular definition'. Recursion is thus a process of defining something in terms of itself.
Program: To calculate the factorial value using recursion.