Home / MCQ Bank / Computer
Computer Dynamic Programming In Data Structures

What will be the output when the following code is executed? #include<stdio.h> int fibo(int n) { int i; int fibo_terms[100]; fibo_terms[0]=0; fibo_terms[1]=1; for(i=2;i<=n;i++) fibo_terms[i] = fibo_terms[i-2] + fibo_terms[i-1]; return fibo_terms[n]; } int main() { int r = fibo(8); printf("%d",r); return 0; }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option D • 21

Related Computer Questions

An input device that uses switch contacts placed under a plastic pad which may be inscribed with symbols is known as In a query, using the keyword _______________ will return records in which the field value is between two numbers. PowerPoint 2000 has______ Number of views What will be the output of the following Python code? num = ['One', 'Two', 'Three'] for i, x in enumerate(num): print('{}: {}'.format(i, x),end=" ") What is the purpose of the write() method in file handling?