Java Programming

Computing

Quiz 13 :

Recursion

Quiz 13 :

Recursion

Question Type
search
arrow
The process of solving a problem by reducing it to smaller versions of itself is called recursion.
Free
True False
Answer:

Answer:

True

Tags
Choose question tag
close menu
arrow
A recursive method in which the first statement executed is a recursive call is called a tail recursive method.
Free
True False
Answer:

Answer:

False

Tags
Choose question tag
close menu
arrow
A program will terminate after completing any particular recursive call.
Free
True False
Answer:

Answer:

False

Tags
Choose question tag
close menu
arrow
The base case starts the recursion.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The recursive implementation of the factorial method is an example of a tail recursive method.
True False
Answer:
Tags
Choose question tag
close menu
arrow
In reality, if you execute an infinite recursive method on a computer, it will execute forever.
True False
Answer:
Tags
Choose question tag
close menu
arrow
You can think of a recursive method as having unlimited copies of itself.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The body of a recursive method contains a statement that causes the same method to execute before completing the current call.
True False
Answer:
Tags
Choose question tag
close menu
arrow
A method that calls another method and eventually results in the original method call is called indirectly recursive.
True False
Answer:
Tags
Choose question tag
close menu
arrow
To design a recursive method, you must determine the limiting conditions.
True False
Answer:
Tags
Choose question tag
close menu
arrow
In the base case of a recursive solution, the solution is obtained through a call to a smaller version of the original method.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The following is an example of a recursive method. public static int recFunc(int x) {return (nextNum(nextNum(x)));} where nextNum is method such that nextNum(x) = x + 1.
True False
Answer:
Tags
Choose question tag
close menu
arrow
If every recursive call results in another recursive call, then the recursive method (algorithm) is said to have infinite recursion.
True False
Answer:
Tags
Choose question tag
close menu
arrow
Every recursive call has its own code.
True False
Answer:
Tags
Choose question tag
close menu
arrow
A method that calls itself is an iterative method.
True False
Answer:
Tags
Choose question tag
close menu
arrow
Every recursive definition can have zero or more base cases.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The general case of a recursive solution is the case for which the solution is obtained directly.
True False
Answer:
Tags
Choose question tag
close menu
arrow
A method is called directly recursive if it calls another recursive method.
True False
Answer:
Tags
Choose question tag
close menu
arrow
A general case to a recursive algorithm must eventually reduce to a base case.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The following is a valid recursive definition to determine the factorial of a non-negative integer. 0! = 1 1! = 1 n! = n * (n - 1)! if n > 0
True False
Answer:
Tags
Choose question tag
close menu
Showing 1 - 20 of 50