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

Can you add pointers together? Why would you?

1182


c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

1101


How can you invoke another program from within a C program?

1120


What is difference between %d and %i in c?

1307


How the c program is executed?

1198


Define and explain about ! Operator?

1045


What is 1f in c?

2730


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5502


What are the application of c?

1162


What is the difference between array and pointer?

1085


What is static memory allocation? Explain

1138


Explain about the functions strcat() and strcmp()?

1095


Write a program to check armstrong number in c?

1180


Who invented bcpl language?

1248


What is c system32 taskhostw exe?

1071