Skip to main content
Became Hot Network Question
edited tags
Link
Source Link

automatic memory allocation

Global variables are given fixed addresses in main memory by the C compiler, called static memory allocation. Function local variables are created on the stack, this is called automatic memory allocation.

Why is it done this way?