Home
SELF STUDY
BrowsePracticeTestsPlaylistDoubts & solutionsFree live classesOther courses

C Programming

Quick practice

Question 1 of 5

Consider a standard Fibonacci series function as follows:


f i b(n)=\left\{\begin{array}{ll} 0 & n=0 \\ 1 & n=1 \\ f i b(n-1)+f i b(n-2) & n>1 \end{array}\right\}


For calculating fib(7), total number of additions required using above function is?

A

42

B

20

C

13

D

14

Get unlimited practice with GATE - CSIT, DSAI & Interview Preparation subscription

pick

Boost your performance with adaptive practice tests

pick

Practice every concept in the syllabus

pick

Compare your speed and accuracy with your peers

pick

Download the app and practice on the go