A. End of files is reached
B. When getc() fails to read a character
C. Both of the above
D. None of the above