#include
void foo();
void main()
{
static int a = 1;
foo();
}
void foo()
{
static int a;
printf("%d" ,a);
}
Output of above code snippet is:
void foo();
void main()
{
static int a = 1;
foo();
}
void foo()
{
static int a;
printf("%d" ,a);
}
Output of above code snippet is:
1
0
2
1
3
Garbage
4
Compile time error