Interesting little bug here:
if (host != NULL) { printf("hi"); } else { printf("FAIL"); } return 0;
doesn\'t prin
The difference is the \n characters.
As you printf characters, they are accumulated in a buffer which isn't sent to the output device until an 'end of line' character is sent.