In C, storage classes define the scope, lifetime, and visibility of variables. The main types are:
- auto: Default for local variables, their scope is limited to the block in which they are declared.
- register: Used for variables that should be stored in a register rather than RAM for faster access.
- static: Preserves the value of a variable between function calls and limits its scope to the block it is declared in.
- extern: Used to declare a variable defined in another file or outside the current function or block.