fork returns a pid_t, not a short int. To print a short int, use %hd. #include <unistd.h> for fork.

>fflush(NULL);

*sad face*