Evaluating 5!

The evaluation of 5! would proceed as shown in Fig. 6.26, which illustrates how the succession of recursive calls proceeds until 1! is evaluated to be 1, terminating the recursion. Figure 6.26(b) shows the values returned from each recursive call to its caller until the final value is calculated and returned.

Image

Fig. 6.26. Recursive evaluation of 5!.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.85.142