Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1081


What are the parts of c program?

1101


How does placing some code lines between the comment symbol help in debugging the code?

985


What does node * mean?

1193


Explain what is the difference between functions abs() and fabs()?

1176


What is the size of array float a(10)?

1138


How can this be legal c?

1082


what are the different storage classes in c?

1177


Write a program to reverse a given number in c?

1033


What is the use of ?

1033


What is the difference between break and continue?

1507


write a program to find out prime number using sieve case?

2089


Is it possible to execute code even after the program exits the main() function?

1330


How many loops are there in c?

1105


How do you determine whether to use a stream function or a low-level function?

1119