Examveda

What is the output of the following program?
#include<stdio.h>
int fibo(int n)
{
      if(n<=1)
	 return n;
      return fibo(n-1) + fibo(n-2);
}
int main()
{   
      int r = fibo(50000);
      printf("%d",r); 
      return 0;
}

A. 1253556389

B. 5635632456

C. Garbage value

D. Runtime error

Answer: Option D


Join The Discussion

Related Questions on Dynamic Programming in Data Structures