CSCE 121 Chapter Notes - Chapter 15: Collation

51 views9 pages

Document Summary

True/false: the following is a valid recursive definition to determine the factorial of a non-negative integer. Ref: 986: in a recursive function, the base case stops the recursion. Ref: 986: with recursion, the base case must eventually be reduced to a general case. Ref: 986: the following is an example of a recursive function, where nextnum is a function such that nextnum(x) = x + 1. int recfunc(int x) return nextnum(nextnum(x)); Ref: 986-987: the following is an example of a recursive function. void print(int x) if (x > 0) cout << x << " " ; print (x - 1); Ref: 986-987: every call to a recursive function requires the system to allocate memory for the local variables and formal parameters. Ref: 988: infinite recursions execute forever on a computer. Ref: 988-989: you can use a recursive algorithm to find the largest element in an array. Ref: 989: to design a recursive function, you must determine the limiting conditions.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions