Storage Class
Storage classes include following categories:
auto
extern
register
static.
--------------------------------------------------------------------------------
auto
The auto keyword is used to place the specified variable into the stack area of memory. In most variable declaration,this is usually implicit one, e.g. int i;
--------------------------------------------------------------------------------
extern
The extern keyword is used to specify variable access the variable of the same name from some other file. In modular programs,this is very useful for sharing variables.
--------------------------------------------------------------------------------
register
The register keyword gives suggest to the compiler to place the particular variable in the fast register memory located directly on the CPU. Most compilers these days (like gcc) are so smart that suggesting registers could actually make your program more slower.
--------------------------------------------------------------------------------
static
It is also used to declare the variables to be private to a certain file only when declared with global variables. static can also be used with functions, making those functions visible only to file itself.The static keyword is used for extending the lifetime of a particular variable. The variable remains even after the function call is long gone (the variable is placed in the alterable area of memory),if you declare a static variable inside a function,. The static keyword can be overloaded.