if there is a global variable what will the stack memory do with it?
What about global variables?
Hi @soul_coder
C has three different pools of memory.
– static: global variable storage, permanent for the entire run of the program.
– stack: local variable storage (automatic, continuous memory).
– heap: dynamic storage (large pool of memory, not allocated in contiguous order).
Static memory persists throughout the entire life of the program, and is usually used to store things like global variables, or variables created with the static clause.
Thank you for clarifying<3