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
What library is sizeof in c?
using only #include
How to establish connection with oracle database software from c language?
What does #pragma once mean?
Is printf a keyword?
what is uses of .net
How are Structure passing and returning implemented by the complier?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
What is a lvalue
what are the advantages of a macro over a function?
What are the features of c language?
how could explain about job profile
What is d'n in c?
What is s or c?
What is structure and union in c?