aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Data Structure Quiz 10
  • The function of generating the nth fibonacci number is gi...
Multiple choice

The function of generating the nth fibonacci number is given below 0 n = 1 Fib(n) = 1 n = 2 Fib(n-1) + Fib(n-2) n>2 What is the value of Fib(10)

  1. 21

  2. 34

  3. 55

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Fib(1)=0, Fib(2)=1, Fib(3)=1, Fib(4)=2, Fib(5)=3, Fib(6)=5, Fib(7)=8, Fib(8)=13, Fib(9)=21, Fib(10)=34.

Keep practicing — related questions

  • What is the next number in the Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ?
  • What will be the result of the given code snippet in C language? main() { int x=1; clrscr(); for(;x++;x%10?...
  • Directions: Which of the given options best represents the information in the given reading passage? Choose...
  • Directions: Which of the given options best represents the information in the given reading passage? Choose...
  • Directions: Which of the given options best represents the information in the given reading passage? Choose...
  • Directions: Which of the given options best represents the information in the given reading passage? Choose...
  • Directions: Which of the given options best represents the information in the given reading passage? Choose...
  • Directions: Which of the given options best represents the information in the given reading passage? Choose...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy