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
Can you add pointers together? Why would you?
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
How can you invoke another program from within a C program?
What is difference between %d and %i in c?
How the c program is executed?
Define and explain about ! Operator?
What is 1f in c?
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.
What are the application of c?
What is the difference between array and pointer?
What is static memory allocation? Explain
Explain about the functions strcat() and strcmp()?
Write a program to check armstrong number in c?
Who invented bcpl language?
What is c system32 taskhostw exe?