Do not confuse the scope of a variable with its lifespan. In other words, even when a static variable is not in view, it continues to retain its state.
One major disadvantage of static variables is that the size allocated
cannot change as a program executes. If an array has a size of
integers, it can only have
elements throughout the execution of
a program. The size of a static array cannot grow nor shrink.
Memory can be allocated statically, as follows:
struct X pool[256];