Ashokkumar01cbe
Broken In
hi frnds
void staticno();
void main()
{
staticno();
staticno();
staticno();
}
void staticno()
{
static int c=0;
printf("\n%d",c++);
}
the output i got is 0
1
2
and for this program second program
void staticno();
void main()
{
staticno();
staticno();
staticno();
}
void staticno()
{
static int c;
c=0;
printf("\n%d",c++);
}
i got the output as 0
0
0. the above two programs are almost same but i got different kind of outputs please explain me..
void staticno();
void main()
{
staticno();
staticno();
staticno();
}
void staticno()
{
static int c=0;
printf("\n%d",c++);
}
the output i got is 0
1
2
and for this program second program
void staticno();
void main()
{
staticno();
staticno();
staticno();
}
void staticno()
{
static int c;
c=0;
printf("\n%d",c++);
}
i got the output as 0
0
0. the above two programs are almost same but i got different kind of outputs please explain me..