The attached file provides a test case. Compile, then run it as follows: "./a.out ubuntu.com". If /etc/hosts exists, it should print "ubuntu.com 0". If it does not exist, it should print "ubuntu.com -11".
The attached file provides a test case. Compile, then run it as follows: "./a.out ubuntu.com". If /etc/hosts exists, it should print "ubuntu.com 0". If it does not exist, it should print "ubuntu.com -11".