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

Homegroups are designed for computers with either the Windows operating system or Apple's OS X operating system.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Clicking the End Review button ________

A) applies all changes that were accepted and rejects those that were not accepted B) rejects all recommended changes and keep the original intact C) deletes all comments in the presentation D) accepts all recommended changes

Computer Science & Information Technology

What is a trigger inside of Unity?

What will be an ideal response?

Computer Science & Information Technology

Explain how you can work with selection lists.

What will be an ideal response?

Computer Science & Information Technology