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

How many loops are there in c?

1047


What are type modifiers in c?

1000


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1018


What is the difference between mpi and openmp?

1217


Write a program which returns the first non repetitive character in the string?

1054


Is c high or low level?

963


What is a list in c?

983


Should a function contain a return statement if it does not return a value?

1017


What is include directive in c?

1092


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

1085


Explain what is a static function?

1047


Differentiate between a structure and a union.

1227


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

1215


Why is c so popular?

1118


given post order,in order construct the corresponding binary tree

2724