OA. free
Free
Accenture Core Computer Science Core Computer Science Medium

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?

Choose one option.
Show answer & explanation
Answer: B. 80

The URL scheme is HTTP, which uses the default port 80. The query parameter port=123 is data passed to the server-side script, not the TCP port the browser uses to connect. The hostname contains 'ftp' but that is just part of the domain name—it does not change the protocol's default port.

Step-by-step Derivation:

  1. Parse the URL: http://ftp.example.jp/index.cgi?port=123
  2. Identify the scheme: HTTP
  3. HTTP scheme uses default TCP port 80 (no explicit port is specified in the URL)
  4. The query string ?port=123 is application-level data sent to /index.cgi after the TCP connection is established on port 80
  5. Port 21 is FTP's default port (not used here—the scheme is HTTP, not FTP)
  6. Port 443 is HTTPS's default port (not used—the scheme is HTTP, not HTTPS)
  7. Port 123 is not used; it's only a query parameter value
  8. Therefore, the answer is 80.