What is the output of below code?
main()
{
static in a=5;
printf("%3d",a--);
if(a)
main();
}

Answer Posted / srinivas reddy m v

54321

here main() is called again in main function
this leads to recursion....

the function is called until a become 0.
value is retained as static key word is used.

not much clear about usage of "%3d"

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why isnt there a numbered, multi-level break statement to break out

583


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2299


What are pragmas and what are they good for?

567


What is #define size in c?

640


What are the loops in c?

589






why wipro wase

1823


What is c preprocessor mean?

783


What are unions in c?

572


write a proram to reverse the string using switch case?

2461


What does char * * argv mean in c?

621


Can include files be nested?

623


Why we write conio h in c?

558


How can I remove the trailing spaces from a string?

608


How are strings stored in c?

588


Why clrscr is used in c?

577