A storage class specifier in the C programming language determines how variables are allocated, accessed, and stored in memory. It specifies a variable's range, lifetime, & visibility within a program.
C has four different types of storage classes.
Variables declared with this class are created when a function is called and removed when the function terminates. They are stored in stack memory.
Variables declared using this class keep their value between function calls. They are only initialized once and keep their value throughout the program's execution, which is kept in the data segment of memory.
This class is used to declare local variables that should be stored in a register rather than RAM, if possible, to improve access speed. However, current compilers are quite efficient in register allocation, therefore this keyword is often eliminated.
Variables declared with this class are available across the program and can be referenced in various files. They are declared outside of any function with the extern keyword and are normally defined in a separate source file.