There is no need at all that you absolutely need to implement a stack or a bunch. C does not indicate, for example, a stack. In fact, in many languages you don’t even have to care, you just indicate that the implementation (compiler, interpretation, or something else) frees up space for the variable, and possibly for a long time.
Your language translator (presumably one) could do int main(void) { char memory[1048576]; run_script_from_stdin_using(memory); } int main(void) { char memory[1048576]; run_script_from_stdin_using(memory); } int main(void) { char memory[1048576]; run_script_from_stdin_using(memory); } . You can even call mmap (2) to get an anonymous block of memory, and use this to insert your variables. It just doesn't matter where the objects live, and this stack / heap are terms that are of dubious value, given that they are often interchangeable.
source share