Which of the following function headings can be used for a recursive definition of a function to calculate the nth Fibonacci number?

A. void rFibNum(int a, int b)
B. bool rFibNum(int a, int b)
C. bool rFibNum(int a, int b, int n)
D. int rFibNum(int a, int b, int n)


Answer: D

Computer Science & Information Technology

You might also like to view...

How many times is the body of the loop below executed?

int counter = 1; while (counter > 20) { // body of loop counter = counter - 1; } // end while a. 19. b. 20. c. 21. d. 0.

Computer Science & Information Technology

Instance variables declared final do not or cannot:

a. Cause syntax errors if used as a left-hand value. b. Be initialized. c. Be modified after they are initialized. d. None of the above.

Computer Science & Information Technology

What is the process for breaking the link to an object style?

What will be an ideal response?

Computer Science & Information Technology

Mobile wireless Internet access is the type of direct connection most commonly used with smartphones and tablets to keep them connected to the Internet via a mobile phone network, even as they are carried from place to place.

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

Computer Science & Information Technology