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 the below program and how it is?

void main()
{
static int var=5;
printf("%d",var--);
if(var)
main();
}

Answer Posted / thiyagu

since the value of var is declared as static
the output will be 4 for each time printf is called by
recursive method main().

Is This Answer Correct ?    5 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2401


Explain the difference between getch() and getche() in c?

937


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2204


In C programming, what command or code can be used to determine if a number of odd or even?

990


How can you increase the size of a dynamically allocated array?

1132


What are bitwise shift operators in c programming?

1037


Is that possible to store 32768 in an int data type variable?

1033


Here is a neat trick for checking whether two strings are equal

967


Why do we use int main instead of void main in c?

1100


Is c procedural or functional?

979


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

2079


What are integer variable, floating-point variable and character variable?

1183


What is the heap?

1155


Define C in your own Language.

1033


What is #define used for in c?

1015