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
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
What is the main difference between calloc () and malloc ()?
Why structure is used in c?
How do you determine a file’s attributes?
Explain output of printf("Hello World"-'A'+'B'); ?
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
Is null equal to 0 in sql?
Can a void pointer point to a function?
What is the modulus operator?
Explain About fork()?
What is a MAC Address?
What are register variables in c?
What is the difference between single charater constant and string constant?
What is the sizeof () operator?
Explain what are the different file extensions involved when programming in c?