You need to include additional C run-time include files to support the file input and output operations. Add the following statements to the beginning of the C-language source file:
#include <sys\types.h>
#include <sys\stat.h>