First guess is that the c code you are running is missing some sort of input (say perhaps a command line argument that specifies the file name to write to for the fprintf call?), but without further...