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 / devi dayal jangra

syntax error.... in prinf...but it should be corrected then
the result will be
5
3
1
Note ...
in first run I=5; printf(i--) print I which is 5 and store 4
in i.
in second run i-- means 4-1=3 then printf(i--) print 3 and
store 2 in i.
in third run... i-- measn 2-1=1 then printf(i--) print 1 and
store 0 in i.
then decreament statement i-- store 1=-1 and when compare
-1>=0 become false and goto next statement after that loop.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does %p mean c?

1073


What are header files and explain what are its uses in c programming?

1133


What is the equivalent code of the following statement in WHILE LOOP format?

1307


Why is this loop always executing once?

1058


What are the various types of control structures in programming?

1061


What are enums in c?

1208


What is the explanation for modular programming?

1216


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

1110


Is array a primitive data type in c?

1061


What is the use of ?: Operator?

1140


Describe the order of precedence with regards to operators in C.

1047


Once I have used freopen, how can I get the original stdout (or stdin) back?

1075


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1093


How can you return multiple values from a function?

1118


Who is the founder of c language?

1170