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...

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

What is the use of volatile?

1071


Why c is called a middle level language?

1084


How is pointer initialized in c?

1010


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1059


Differentiate between a for loop and a while loop? What are it uses?

1164


Why isnt any of this standardized in c?

1058


What is calloc malloc realloc in c?

1046


What is file in c language?

990


Explain indirection?

1107


What is the mean of function?

1103


Where register variables are stored in c?

947


Where in memory are my variables stored?

1165


Are the outer parentheses in return statements really optional?

1101


How do we declare variables in c?

1048


Explain enumerated types in c language?

1027