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 line of code represents the general case?

A. long fib (long num)
B. if (num == 0 || num == 1)
C. return num;
D. return (fib (num - 1) + fib (num - 2));


Answer: D

Computer Science & Information Technology

You might also like to view...

A manual page break inserts a new blank page at the end of the document

Indicate whether the statement is true or false

Computer Science & Information Technology

Sizing handles are ________ surrounding a selected object that are used to adjust its size

A) circles or squares B) triangles or arrows C) squares or triangles D) arrows or circles

Computer Science & Information Technology

Digital signatures are often used to provide:

What will be an ideal response?

Computer Science & Information Technology

What is the term for the frame that surrounds an image?

A. Edge B. Border C. Shear D. Notion

Computer Science & Information Technology