Chapter 14Recursive C Functions
This chapter converts the mathematical formulas from the previous chapter into C programs. A recursive function usually has the following structure:
A recursive function should first check whether the arguments satisfy a stop condition (also called terminating condition or base case) and the function can return the answer. When the condition is true, the problem is simple enough and recursive calls are unnecessary. If the problem is not simple, then the function ...
Get Intermediate C Programming, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.