Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Nested function calls


1. Nested function calls
Function calls can be nested. Consider the following code.

The calls and returns work as message passing systems where a routines saves what it is doing on the stack, calls the routine (which may save what it is doing on the stack, etc.) and then each called routine returns and the caller resumes what it is doing.

2. Visualization
Here is a visualization of the code below.

Nested function callsHere is the C code.

Here is the output of the C code.


3. Same program
Here is the C code.

Here is the output of the C code.


4. End of page