Explain automatic variable in C
Automatic variables are declared inside a function in which they are to be utilized.
They are created when the function us called and destroyed automatically when the function is exited, hence the name automatic.
Automatic variables are therefore private(or local) to the function in which they are declared.
Because of this property, automatic variables are also reffered to as local or internal variables.
A variable declared inside a function without storage class specification is, by default, an automatic variable.
We may also use the keyword auto to declare automatic variables explicitly.
We may declare and use the same variable name in different functions in the same program without causing any confusion to the compiler.
Labels: C