Question: 0 1 . A method that calls itself is called a a . base method b . iterative method c . recursive method d .

01. A method that calls itself is called a
a. base method
b. iterative method
c. recursive method
d. dynamic method
MC 01 Answer:
02. The condition when a recursive method does not satisfy a base case it is called
a. finite recursion
b. infinite recursion
c. iterative recursion
d. baseless recursion
MC 02 Answer:
03. When too many recursive calls are made creating more activation records than the allocated program memory can handle, what kind of error occurs?
a. activation record overflow
b. recursive overflow
c. infinite recursion
d. stack overflow
MC 03 Answer:
04. What happens when a recursive method does not reach the base case?
a. the program crashes
b. a stack overflow occurs
c. both a & b
d. none of the above
MC 04 Answer:
05. Recursion can be used to solve problems like
a. processing linked chains
b. processing arrays
c. sorting
d. all of the above
MC 05 Answer:
06. Recursive methods
a. are useful when each recursive all is a solution to a smaller, identical problem
b. do not use an if-statement
c. are not useful in programming
d. all of the above
MC 06 Answer:
07. Recursive methods need a(n)
a. for or while loop
b. trace
c. base case
d. all of the above
MC 07 Answer:
08. What question(s) should you keep in mind when debugging a recursive method?
a. Is there at least one recursive call?
b. Did you consider all possible cases?
c. Does the method contain a statement to test an input value and leads to different cases?
d. All of the above.
MC 08 Answer:
09. What question(s) should you keep in mind when debugging a recursive method?
a. Does each base case produce a result that is correct for that case?
b. Are there enough base cases?
c. Is at least one of the cases a base case that has no recursive call?
d. All of the above.
MC 09 Answer:
10. What question(s) should you keep in mind when debugging a recursive method?
a. Should a for-loop be included in the method?
b. If the method returns a value, does each of the cases return a value?
c. Are the activation records correct?
d. All of the above.
MC 10 Answer:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!