Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Monday, March 9, 2015

What is auto storage class ?

Automatic storage class is a type of storage class. It is the Default storage class of a variable. The default initial value of automatic storage class variables is garbage values, unless they are initialized explicitly.

Automatic storage class variables are stored in memory. The scope of automatic storage class variables is local or blocks scope, and the life time of the variable, exists as long as control remains in the block.

Ex: 

#include<stdio.h>
#include<conio.h>
void main()
{
   auto int a=10;
   {
          auto int a=20;
          printf(“%d\n”,a);
   }
   printf(“%d”,a);
   }

Output:     20

            10

No comments:

Post a Comment