Junior — Middle
Where is the sequence of execution of calls stored in a program?
sobes.tech AI
Answer from AI
The sequence of function calls in a program is stored in the call stack. This data structure keeps information about current and previous function calls, including return addresses and local variables.
When a function is called, a new frame with this call's data is pushed onto the stack. After the function finishes, the frame is popped, and control returns to the previous call. This ensures the correct order of execution and return from functions.