Consider the following function to calculate the nth Fibonacci number:long fib (long num){ if (num == 0 || num == 1) return num; return (fib (num - 1) + fib (num - 2));}What is(are) the base case(s)?
A. 0
B. 1
C. 0 and 1
D. num - 1
Answer: C
Computer Science & Information Technology
You might also like to view...
A system for which only input and output are prototypes is called a:
A) first-of-a-series. B) patched-up. C) nonoperational. D) selected features.
Computer Science & Information Technology
What application development methods will you use? Explain your answer. What development tools will help your team finish the business support system and how will you use them?
What will be an ideal response?
Computer Science & Information Technology
You can use the ____________________ to quickly create a data entry tool for a selected table.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology
In what kind of format is this username? logon.name@domain.local
What will be an ideal response?
Computer Science & Information Technology