What should be returned at line commented "//insert here" so that code returns numbers in Fibonacci sequence?

Code
  1. #include <stdio.h>

  2. int fib(n){

  3. if (n <= 2)

  4. return 1;

  5. else

  6. // insert here

  7. }
Copyright GeekInterview.com

a) return fib(n) + fin(n-1);
b) return fib(n-1) + fin(n-2);
c) return fib(n) + fin(n+1);
d) return fin(n-1);

Questions by lalithakasiraj

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions