C Program to Generate Fibonacci series using Recursion
 Recursion: If A function calls itself then that Function called as Recursive function.
Example :
int fun()
{
– – – – – –
fun(); // Here fun is calling fun so it is Recursive Function.
— – – – – –
}
Description :
This Program accept one number from user (Lets say it is n) and prints nth Fibonacci number.
Program :

/* Fib series program using Recursion */

/* Author : Venkatesh macha */

#include<stdio.h>

int fib( int n)

{

if(n==0)

return 0;

if(n==1)

return 1;

return(fib(n–1)+fib(n–2));

}

int main()

{

int num,nth_fib;

printf(” Enter which number in Fib series to print : “);

scanf(“%d”,&num);

nth_fib = fib(num);

printf(“%dth Fibnocci number in Fib series is : %d n“,num,nth_fib);

return 0;

}
Output :
OUTPUT of Fibonacci Series Program using Recursion 