Program to illustrate the concept of auto variable

Auto storage class

It is default Storage class which is used within a program or file.This variable
is defined and accessed within a function


void main()
void fun();
int a=0;
void fun()
int aa=10;     /*variable comes into existence*/

auto variable

In above example aa comes into existence at the start of function "fun" and dies at the end of the function.Auto is the default storage class means no storage specifier is used.