0
#include <stdio.h> int main() { int c=50; for(;c;) c--; printf ("c=%d",c); return 0; }
H
3 Antworten
+ 6
Pls clarify your question, Pls add a code playground, so peope can help you simply, but clarify your question.
Add relevant tags to the question too.
Thank you.
+ 3
c=0, because you decrease it in loop and when item become 0, loop finished!
+ 2
According to your given information about this code ,
I found that here in output,
c=0
Reason: because in your code you decremented the value of c .
And when the value of c become 0 , then we came out of the loop.
Hence , the value of c came as 0 in output.