**DOWNLOAD FREE PDF** **<<CLICK HERE>>**

## Data Structure Questions and Answers-Fibonacci using Recursion

Congratulations - you have completed *Data Structure Questions and Answers-Fibonacci using Recursion*.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%

Your answers are highlighted below.

Question 1 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

Suppose the first fibonnaci number is 0 and the second is 1. What is the sixth fibonnaci number?

5 | |

6 | |

7 | |

8 |

Question 1 Explanation:

The sixth fibonnaci number is 5.

Question 2 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

Which of the following is not a fibonnaci number?

8 | |

21 | |

55 | |

14 |

Question 2 Explanation:

14 is not a fibonnaci number.

Question 3 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

Which of the following methods can be used to find the nth fibonnaci number?

Dynamic programming | |

Recursion | |

Iteration | |

All of the mentioned |

Question 3 Explanation:

All of the above mentioned methods can be used to find the nth fibonacci number.

Question 4 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

Consider the following iterative implementation to find the nth fibonacci number:

int main() { int n = 10, i; if(n == 1) printf("0"); else if(n == 2) printf("1"); else { int a = 0, b = 1, c; for(i = 3; i <= n; i++) { c = a + b; .....; .....; } printf("%d", c); } return 0; }

Which of the following lines should be added to complete the above code?

c = b b = a | |

a = b b = c | |

b = c a = b | |

a = b b = a |

Question 4 Explanation:

The lines "a = b" and "b = c" should be added to complete the above code.

Question 5 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

Which of the following recurrence relations can be used to find the nth fibonacci number?

F(n) = F(n) + F(n - 1) | |

F(n) = F(n) + F(n + 1) | |

F(n) = F(n - 1) | |

F(n) = F(n - 1) + F(n - 2) |

Question 5 Explanation:

The relation F(n) = F(n - 1) + F(n - 2) can be used to find the nth fibonacci number.

Once you are finished, click the button below. Any items you have not completed will be marked incorrect.

There are 5 questions to complete.