It is C, not C++, and it is perfectly valid on compilers that automatically #include <stdio.h> and accept the aberrant argument list.
That said, I don't think presuming EOF is -1 is very kosher either... Also, if this is anyhing other than playing around then you are making a mistake...
Other than all that, I don't see any way to shorten it...