Which is true about a recursive method that fails the re-computation question (ie, it computes the same value in multiple recursive calls):

A- This method would not compile.
B- This method would finish, but compute the wrong value.
C- This method could finish eventually with the correct result, but might take a long amount of time to compute.
D- This method would result in an infinite recursion.


Answer: C- This method could finish eventually with the correct result, but might take a long amount of time to compute.

Computer Science & Information Technology

You might also like to view...

Which of the following is not a disadvantage of default memberwise copy with objects containing pointers?

a. Having the possibility of leaving a dangling pointer. b. Allowing both objects to point to the same dynamically allocated storage. c. Allowing the destructor of one object to be called while leaving the second pointer, to the same memory location, intact. d. Requiring the explicit overloading of the assignment operator.

Computer Science & Information Technology

An empty array is an array that contains no ____.

A. data B. indexes C. memory D. elements

Computer Science & Information Technology

You can copy artwork in Illustrator and paste it into Flash.

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

Computer Science & Information Technology

A form that enables users to view but not change data is a(n) ________ form

Fill in the blank(s) with correct word

Computer Science & Information Technology