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

Answer Posted / amol subhash kumbhar

Output is:- 5 4 3 2 1 (This Manner)
In main()
Static is the Preserves Keyword Used to Statically allocate
the memory allocation
%3d means the 3 space are allocate in the output like as 5
4 3 2 1
main() :- main function called in main function means
recursion is applied

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the heap in c?

637


What are data structures in c and how to use them?

669


What is a newline escape sequence?

663


How can I read and write comma-delimited text?

616


What is n in c?

569






Is there any data type in c with variable size?

628


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

916


What is pointer in c?

734


How can I swap two values without using a temporary?

610


What is the description for syntax errors?

609


When a c file is executed there are many files that are automatically opened what are they files?

587


What are the header files used in c language?

583


write a program to rearrange the array such way that all even elements should come first and next come odd

1756


When is a void pointer used?

672


How can you invoke another program from within a C program?

609