Output of c program


#1

What will be the output of the following C program?
void count(int n)
{
static int d=1;
printf("%d",n);
printf("%d",d);
d++;
if(n>1) count(n-1);
printf("%d",d);
}
void main()
{
count(4);
}


#2

Important : Storage identifier “Static”

O/p : 4 1 3 2 2 3 1 4 5