M
morpheus
Hi Group,
May I ask the following?
for (i=0; (c=getchar()) != EOF && c != '\n'; ++i)
line=c;
What I am finding is that when c == '\n' is true, the loop is
terminated but i is still incremented. I was under the impression that
termination of the loop should not increment i.
Thank you.
May I ask the following?
for (i=0; (c=getchar()) != EOF && c != '\n'; ++i)
line=c;
What I am finding is that when c == '\n' is true, the loop is
terminated but i is still incremented. I was under the impression that
termination of the loop should not increment i.
Thank you.