## Help authour, Buy PDF Ebook
>>>**Click Here**<<<

## Data Structure Questions and Answers-Fibonacci using Recursion

## Click on any option to know the CORRECT ANSWERS

Question 1 |

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

5 | |

6 | |

7 | |

8 |

**UPSC Questions answers**

Question 1 Explanation:

The sixth fibonnaci number is 5.

Question 2 |

Which of the following is not a fibonnaci number?

8 | |

21 | |

55 | |

14 |

**Management Questions answers**

Question 2 Explanation:

14 is not a fibonnaci number.

Question 3 |

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

Dynamic programming | |

Recursion | |

Iteration | |

All of the mentioned |

**Reasoning Questions answers**

Question 3 Explanation:

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

Question 4 |

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 |

**Arab culture Questions answers**

Question 4 Explanation:

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

Question 5 |

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) |

**Current affairs Questions answers**

Question 5 Explanation:

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

There are 5 questions to complete.