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

HTTP uses the default port 80 by default. The URL scheme http:// determines the protocol and its default port, not the query string parameter port=123. Query parameters are sent to the server after the connection is established and have no effect on which port the browser connects to.

Step-by-step Derivation:

  1. URL scheme analysis: http://ftp.example.jp/index.cgi?port=123 starts with http://, which specifies the HTTP protocol.
  2. Default port lookup: HTTP protocol uses TCP port 80 as its default port (defined in RFC 7230).
  3. Query string clarification: The ?port=123 is a query parameter passed to the server-side script (index.cgi). It does not instruct the browser which port to connect to.
  4. Port specification syntax: If a specific port were needed, it would be in the URL as http://ftp.example.jp:8080/index.cgi (colon-separated before the path).
  5. Conclusion: The browser connects to port 80, the standard HTTP port.