#include #include int main(int argc,char *argv[]) { int i; if(argc < 2) return 1; struct hostent *he=gethostbyname(argv[1]); for(i=0;he->h_addr_list[i];i++) { printf("%u.%u.%u.%u\n", (unsigned char)he->h_addr_list[i][0], (unsigned char)he->h_addr_list[i][1], (unsigned char)he->h_addr_list[i][2], (unsigned char)he->h_addr_list[i][3]); } return 0; }