Give the three criteria for a correct recursive void-function.

What will be an ideal response?


a) The recursion terminates.
b) The stopping case performs the correct action for that case.
c) For each recursive case, if the recursive call perform the correct action for that case, then the entire case performs correctly.

Computer Science & Information Technology

You might also like to view...

Which of the following expressions is legal? Treat the effect of these as non- cumulative.

Suppose we have the following definition: ``` vector vec, vec1; //use push_back to put 10 values into vec instead vector::iterator p = vec.begin(); vector::const_iterator q = vec.begin(); ``` a) *p = 1; b) *q = 1; c) p = vec.end (); d) q = vec1.end();

Computer Science & Information Technology

You can change the transparency of a picture used as a slide's background in the ____ dialog.

A. Adjust Transparency B. Format Picture C. Picture Transparency D. Format Background

Computer Science & Information Technology

In a do-while loop, the closing brace is followed by the keyword end, the condition, and a semicolon.

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

Computer Science & Information Technology

?The _________ element defines a container for an external application or interactive content.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology