Chapter 5: Problem 8
When a function is executing, what happens when the end of the function's block is reached?
Short Answer
Expert verified
Answer: When the end of a function's block is reached during the function execution, the following events occur:
1. The program flow returns to the point where the function was called.
2. The local variables created inside the function are destroyed.
3. If a return value is specified, it is sent back to the calling code.