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

will u please send me the placement papers to my mail???????????????????

1597


What is strcmp in c?

743


Explain what are run-time errors?

792


can any one tel me wt is the question pattern for NIC exam

1728


What is the deal on sprintf_s return value?

814






Why do we use c for the speed of light?

794


What does != Mean in c?

772


How important is structure in life?

754


What is a program flowchart?

794


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

1609


What are shell structures used for?

771


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

885


What is void main () in c?

921


How do I copy files?

792


In which header file is the null macro defined?

1093