Do the C compilers preallocate every variable that exists in a program? Or do they allocate while the program is running?
For example, when I define a variable, like int x = 20;
in a function that can possibly be called in main, does the compiler already allocates stack memory for that variable? ‘Cause, as I said, it’s a variable that may be called, but also may not be called and the program could possibly end and never call it.