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

1. A recursive function is a function whose definition contains a call to the function being defined
2. A design technique is to break a problem into smaller tasks, with the prospect that a smaller problem will be easier to solve. If the smaller task is the identical to the original task excepting only that the size is smaller, the problem may be solved using a recursive algorithm, and implemented with a recursive function.
3. It is proper for a recursion to run on without ending.
4. A proper recursive solution requires at least two cases: a recursive function that calls the recursive function with a smaller problem, and a base, or stopping case.
5. In recursion, it is unnecessary to decide whether a stopping case has been reached.


1. True
Any function that calls itself is referred to as recursive.
2. True
3. True
Nevertheless, a program that was written by a student at this level that does not terminate, is likely to be wrong, whether the failure to terminate is due to an infinite loop or a recursion that does not stop. It is not true that every program that does not terminate is wrong. Some programs have an intentional infinite loop. Examples include an ATM program and reservation systems that typically have an outer loop that repeats the service menu forever. Windowing systems (a.k.a. graphical user interfaces, or GUIs) also have an event loop that does not terminate. This loop waits for an event such as a mouse click or keystroke.
4. True
This is the general outline of a successful recursion.
5. False
In recursion, termination requires that a stopping case be reached. It is necessary to decide whether this case has been reached.

Computer Science & Information Technology

You might also like to view...

In the statement x=a + b * c + e which is the first operation that is performed when this C++ statement is executed?

A. a + b B. b * c C. a + b * c D. x = a

Computer Science & Information Technology

What is Favicon?

What will be an ideal response?

Computer Science & Information Technology

Carbonite is an example of an online backup service

Indicate whether the statement is true or false

Computer Science & Information Technology

In a Web page created using an Expression Web template, the layout and formatting are saved to ____.

A. placeholders B. CSS files C. divs D. documents

Computer Science & Information Technology