The definition of buf
is char buf[BUFSIZE];
,according to the content in the book, page 19:
We must declare c to be a type big enough to hold any value that getchar returns. We can't use char since c must be big enough to hold EOF in addition to any possible char. Therefore we use int.
Then we get the answer:
int buf[BUFSIZE];