It is mentioned in the book that EOF is an
integer defined in <stdio.h>, so we
use %d and pass in EOF as an argument for
printf.
#include <stdio.h>
main()
{
printf("%d\n", EOF);
}
On most systems, you will find that EOF is equal to -1,
but this is not always the case since the value of EOF is
not defined by the C standard.