Something
public text v1 · immutableint main(void){
struct in_addr in;
struct host_struct hs;
hs.h_addr_list = malloc(sizeof(char *) * 10); //ten IP addreses
hs.h_addr_list[0] = "127.0.0.1"; //the first of which is localhost
inet_aton(hs.h_addr_list[0], (struct in_addr *)&in);
printf("IP: %s in hex is: %X\n", hs.h_addr_list[0], in.s_addr);
return 0;
}