I never saw such a while statement before.
while(printf("> "), fgets(str, 100, stdin), !feof(stdin)) {
..
..
}
I read online, that the condition to come out of while loop is the rightmost one [ !feof(stdin) ].
Then, what is the use of the above while statement as opposed to
while(!feof(stdin))
{
printf("> ");
fgets(str, 100, stdin);
...
...
}
Also, while statement takes an expression, so is 1,1,1 a valid expression in C?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…