Hi Group,
When I run this:
# include <stdio.h>
int main(){
int c=0;
while ( (c=getchar()) != EOF && c != ' ' && c != '\t' )
printf("foo");
if (c == '8')
putchar(c);
else if (c=='\n')
printf( " It's a new line");
return(0);
}
and the stdin is: 'b" i get "foofoo" as the output.
8 or a new line feed gives "8" and "It's a new line" as expected.
My question is this. How exactly is the while statement evaluated if c
is neither a space or a tab.
Thank you.