In C/C++ memory allocation can be done statically (during compilation time) and/or dynamically (during run time).
Static Memory Allocation:
Memory space allocation during compilation in C/C++ depends on the type of data declaration.
Static memory: These variables are defined outside of functions with a keyword static. The scope of these variable are local to the . . . →Read More:Memory Allocation