Shouldn't this be
fwrite("Hello, world!\n", 1, 14, stdout)
instead? After all, the string is 14 characters in length, not including the terminating NUL char. What does writing a NUL char to stdout do, anyways?