Question: i wrote this code. but it gives Segmentation fault #include int fibo(int n) { if(n==0)return 2; if(n==1)return -1; return 2*fibo(n+1)+3*fibo(n); } int main() { int

i wrote this code. but it gives Segmentation fault #include int fibo(inti wrote this code. but it gives Segmentation fault

#include int fibo(int n) { if(n==0)return 2; if(n==1)return -1; return 2*fibo(n+1)+3*fibo(n); } int main() { int n; printf("Enter n ="); scanf("%d",&n); printf("%d ",fibo(n)); return 0; }

please explain why

2. A sequence an is given with the following rule Write a C program to compute a17

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!