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 is meant by initialization and how we initialize a variable?

816


Why c language?

841


How to declare pointer variables?

906


When should you not use a type cast?

887


Is c still used?

802


How can I use a preprocessorif expression to ?

787


which type of aspect you want from the student.

1908


Explain the advantages and disadvantages of macros.

845


Describe the header file and its usage in c programming?

835


What are the two types of functions in c?

769


how logic is used

1714


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

1840


How do you construct an increment statement or decrement statement in C?

994


What is a const pointer in c?

870


Why header files are used?

843