R
Ramalingam Chandran
case 1:
int i;
void main()
{
calli();
printf("%d",i)
}
calli()
{
i=10;
}
output of i=?
case 2:
static int i;
void main()
{
calli();
printf("%d",i)
}
calli()
{
i=10;
}
output of i=?
question:
in both cases what will be the output of i and what is the difference
between declaring i as a global variable and i as a global static
variable.
int i;
void main()
{
calli();
printf("%d",i)
}
calli()
{
i=10;
}
output of i=?
case 2:
static int i;
void main()
{
calli();
printf("%d",i)
}
calli()
{
i=10;
}
output of i=?
question:
in both cases what will be the output of i and what is the difference
between declaring i as a global variable and i as a global static
variable.