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 / subha raman

The operation in for-loop is "i--"..so it will print the
decremented value first..hence the output will be:
4
3
2
1
0

Is This Answer Correct ?    14 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

3663


Why c is called free form language?

575


What is a static variable in c?

671


Give basis knowledge of web designing ...

1578


Why is sizeof () an operator and not a function?

593






What is 1f in c?

1843


What is table lookup in c?

633


What are run-time errors?

602


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

1624


explain how do you use macro?

669


What are identifiers in c?

638


What are different types of operators?

600


What does volatile do?

569


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

627


What is array of structure in c?

603