Which of the following is required in a recursive function?

a) Exactly one recursive call and exactly one stopping case.
b) Calls to functions other than itself.
c) One or more stopping cases after a sequence of calls to one or more recursive cases.
d) A static local variable.
e) One or more stopping cases that are guaranteed to be reached.


c) One or more stopping cases after a sequence of calls to one or more recursive cases. , and e) One or more stopping cases that are guaranteed to be reached.

All of these are possible in a recursive function. However, part a) is too restrictive. Part b) is not required for a recursive function. However, the nonrecursive case may call another function. A collection of mutually recursive functions is certainly a possibility. A first function may have a (potentially recursive) call to another functions that in turn may (recursively) call the first function. Part d): Any function, including a recursive function, may have a static local variable.

Computer Science & Information Technology

You might also like to view...

Which statement is false?

a. SortedSet extends Set. b. Class SortedSet implements TreeSet. c. When a HashSet is constructed, it removes any duplicates in the Collection. d. By definition, a Set object does not contain any duplicates.

Computer Science & Information Technology

The ____ panel stores the most frequently used colors.

a. Colors b. Swatches c. Adjustments d. Tools

Computer Science & Information Technology

The first step in using the subtotal feature in Excel is to ________ the data

Fill in the blank(s) with correct word

Computer Science & Information Technology

To apply a different set of theme fonts to your presentation, on the Ribbon, click the Design tab, and then in the Themes group, click the Fonts button. A ____ opens listing the font sets for each theme.

A. menu B. sorter C. gallery D. tab

Computer Science & Information Technology