Which TCP port number of the server the Web browser will connect to when specifying URL...
Accenture technical mcq question, verified with a worked answer. Free to practise - no sign-up.
Which TCP port number of the server the Web browser will connect to when specifying URL (Universal Resource Locator) as http://ftp.example.jp/index.cgi?port=123 in the Web browser?
Show answer & explanation
The URL scheme is HTTP (not HTTPS, FTP, or custom protocol), which uses the default port 80. The query parameter ?port=123 is application-level data sent to the server after the connection is established; it does not affect the TCP port used for the initial connection. Port 21 is FTP, port 443 is HTTPS.
Step-by-step Derivation:
Step 1: Parse the URL scheme from 'http://ftp.example.jp/index.cgi?port=123'. The scheme is 'http' (lowercase, indicated by the prefix before '://'). Step 2: Apply the IANA standard port mapping for HTTP: port 80 is the default. Step 3: Recognize that 'ftp.example.jp' is just the hostname (not an FTP protocol), and '?port=123' is a query string—both are irrelevant to the TCP port selection. Step 4: Conclude the browser connects to port 80.