1. What is the DNS module and its purpose in Node.js?
The DNS (Domain Name System) module provides methods to resolve domain names to IP addresses. It can perform both asynchronous lookups and direct OS-level resolution using `dns.lookup()` and `dns.resolve()`.
const dns=require('dns');
dns.lookup('google.com',(err,addr)=>console.log(addr));