When does the memory space allocated to local variables and parameters get deallocated? When the application ends, the memory space allocated to local variables and parameters of both the called function and calling program is deallocated. O When the calling program ends, the memory space allocated to local variables and parameters of the called function is deallocated. When the called function ends, the memory space allocated to local variables and parameters of the calling program is deallocated. When the called function ends, the memory space allocated to local variables and parameters of the called function is deallocated. O

Respuesta :

tonb

Answer:

last option: When the called function ends, the memory space allocated to local variables and parameters of the called function is deallocated.

Explanation:

A function, when it is called, uses the stack to allocate local variables. When it exits, those variables are no longer needed (since they are local), so the stack pointer is reset to the position it had before calling the function.

ACCESS MORE