Recursive Function to find Nth Fibonacci number

Recursive Function to find Nth Fibonacci number


int fibo(int N)
{
     fib[0] = 0;
     fib[1] = 1;
     for(i=2; i<=N;i++)
          fib[N] = fib[N-1] + fib[N-2];
     return fib[N];
}

Alternative Recursive function, where we are not supposed to use array and store previous values / results :

int fibo(int N)
{
     if N==0
          return 0;
     if N==1
          return 1;
     return fibo(N-1) + fib(N-2);
}