Why does reading a file with while ((c = getc(file)) != EOF) work on some platforms?
It is discussed in another thread that reading a file with the following code can result in an infinite loop because EOF
is an integer outside the range of char
and the while condition therefore cannot become true:
Why does reading a file with while ((c = getc(file)) != EOF) work on some platforms?
It is discussed in another thread that reading a file with the following code can result in an infinite loop because EOF
is an integer outside the range of char
and the while condition therefore cannot become true:
Why does reading a file with while ((c = getc(file)) != EOF) work on some platforms?
It is discussed in another thread that reading a file with the following code can result in an infinite loop because EOF
is an integer outside the range of char
and the while condition therefore cannot become true:
Why does reading a file with while ((c = getc(file)) != EOF) work on some platforms?
It is discussed in another thread that reading a file with the following code can result in an infinite loop because EOF
is an integer outside the range of char
and the while condition therefore cannot become true: