Q:

Who will do DNS lookup?

I am reading about computer networks. I saw some simple HTTP socket programs(In c gcc). I saw a strange thins on those programs they are using URL directly without any DNS lookup. How this thing works? are dns lookup's implemented by builtin library functions?or else the application programmer need not to worry about DNS someone else may be the isp do it for the programmer?

A:

Yes. Most libraries for network requests do an implicit get_host_by_name (which is the libc function) or similar function for retrieving the IP address. This means that you ask your operating system for the IP. It will then use the internal DNS software to retrieve the address.

