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

how does the for loop work actually..suppose for the
following program how it ll work plz explain to me
for(i=5;i>=0;i--)
prinf(i--);

Answer Posted / manju

The output for the given for loop is
5 3 1.
why because...
first the value of (i=5)>=0,so 5 is printed.After that i
value is decremented because of i-- in the printf() and
again i value is decremented as specified in for loop.
Now the value of i=3.
Again the loop will be continued untill the value of i
becomes 0.

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

1065


What is the main difference between calloc () and malloc ()?

1112


Why structure is used in c?

1132


How do you determine a file’s attributes?

1032


Explain output of printf("Hello World"-'A'+'B'); ?

1452


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1092


Is null equal to 0 in sql?

1105


Can a void pointer point to a function?

981


What is the modulus operator?

1169


Explain About fork()?

1069


What is a MAC Address?

1017


What are register variables in c?

987


What is the difference between single charater constant and string constant?

1049


What is the sizeof () operator?

1039


Explain what are the different file extensions involved when programming in c?

1069