WAP to demonstrate the scope rule of automatic
variables
#include<conio.h>
#include<stdio.h>
int a=1;
void main()
{
auto int a;
clrscr();
printf("\nvalue of a: ");
scanf("%d",&a);
printf("\na: %d",a);
{
a=0;
printf("\na: %d",a);
a++;
}
printf("\na: %d",a);
getch();
}