void main()
{
static int i = 5;
if(--i)
{
main();
printf("%d
",i);
}
}

what would be output of the above program and justify your
answer?

}

Answer Posted / srsabariselvan

0
0
0
0

static variable's value is stored in memory statically upto
end of the program. so if the variable comes out of the
function it retains its value

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by dynamic memory allocation in c? What functions are used?

910


the question is that what you have been doing all these periods (one year gap)

1877


Why do we use pointer to pointer in c?

829


Where static variables are stored in c?

812


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

3265


Why we use stdio h in c?

805


How can I insert or delete a line (or record) in the middle of a file?

807


Why isn't it being handled properly?

849


What is the significance of c program algorithms?

900


Explain what standard functions are available to manipulate strings?

839


What is a header file?

856


What is function prototype in c language?

832


Write a code on reverse string and its complexity.

806


number of times a digit is present in a number

1806


What is the difference between struct and union in C?

913