1. The function sum() in Figure 2.25 is called for the first time by the main program....
Question:
1. The function sum() in Figure 2.25 is called for the first time by the main program. From the second time on, it is called by itself. *
(a) How many times is it called altogether, including the call from main()?
(b) Draw a picture of the main program variables and the run-time stack just after the function is called for the third time. Do not draw the stack frame for main(). You should have three stack frames.
(c) Draw a picture of the main program variables and the run-time stack just before the return from the call of part (b). You should have three stack frames, but with different contents from part (b).
Step by Step Answer:
Related Book For
Question Posted: